Class: Bouncer

Inherits:
Object
  • Object
show all
Defined in:
lib/melody_object/Mo_h_hc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(packet = nil, chn = 0, leg = 4) ⇒ Bouncer

Returns a new instance of Bouncer.



31
32
33
34
35
36
37
38
39
40
# File 'lib/melody_object/Mo_h_hc.rb', line 31

def initialize(packet=nil,chn=0,leg=4)
  @running=true
  @inc=0
  @turned_on=false
  @val=packet
  @chn=chn
  leg=4 if leg.nil?
  @leng=leg
  #~ puts @leng
end

Instance Attribute Details

#chnObject

Returns the value of attribute chn.



29
30
31
# File 'lib/melody_object/Mo_h_hc.rb', line 29

def chn
  @chn
end

#delObject

Returns the value of attribute del.



27
28
29
# File 'lib/melody_object/Mo_h_hc.rb', line 27

def del
  @del
end

#doneObject

Returns the value of attribute done.



21
22
23
# File 'lib/melody_object/Mo_h_hc.rb', line 21

def done
  @done
end

#incObject

Returns the value of attribute inc.



25
26
27
# File 'lib/melody_object/Mo_h_hc.rb', line 25

def inc
  @inc
end

#lengObject

Returns the value of attribute leng.



26
27
28
# File 'lib/melody_object/Mo_h_hc.rb', line 26

def leng
  @leng
end

#runningObject

Returns the value of attribute running.



23
24
25
# File 'lib/melody_object/Mo_h_hc.rb', line 23

def running
  @running
end

#senderObject

Returns the value of attribute sender.



28
29
30
# File 'lib/melody_object/Mo_h_hc.rb', line 28

def sender
  @sender
end

#turned_onObject

Returns the value of attribute turned_on.



24
25
26
# File 'lib/melody_object/Mo_h_hc.rb', line 24

def turned_on
  @turned_on
end

#valObject

Returns the value of attribute val.



22
23
24
# File 'lib/melody_object/Mo_h_hc.rb', line 22

def val
  @val
end

Instance Method Details

#ufObject



42
43
44
# File 'lib/melody_object/Mo_h_hc.rb', line 42

def uf
   Marshal::load(Marshal.dump(self))
end