Class: GlimmerMetronome::Model::Beat
- Inherits:
-
Object
- Object
- GlimmerMetronome::Model::Beat
- Defined in:
- app/glimmer_metronome/model/beat.rb
Instance Attribute Summary collapse
-
#on ⇒ Object
(also: #on?)
Returns the value of attribute on.
-
#up ⇒ Object
(also: #up?)
Returns the value of attribute up.
Instance Method Summary collapse
- #down ⇒ Object (also: #down?)
- #down! ⇒ Object
- #down=(is_down) ⇒ Object
-
#initialize(is_up) ⇒ Beat
constructor
A new instance of Beat.
- #off ⇒ Object (also: #off?)
- #off! ⇒ Object
- #off=(is_off) ⇒ Object
- #on! ⇒ Object
- #up! ⇒ Object
Constructor Details
#initialize(is_up) ⇒ Beat
Returns a new instance of Beat.
29 30 31 |
# File 'app/glimmer_metronome/model/beat.rb', line 29 def initialize(is_up) self.up = is_up end |
Instance Attribute Details
#on ⇒ Object Also known as: on?
Returns the value of attribute on.
25 26 27 |
# File 'app/glimmer_metronome/model/beat.rb', line 25 def on @on end |
#up ⇒ Object Also known as: up?
Returns the value of attribute up.
25 26 27 |
# File 'app/glimmer_metronome/model/beat.rb', line 25 def up @up end |
Instance Method Details
#down ⇒ Object Also known as: down?
54 55 56 |
# File 'app/glimmer_metronome/model/beat.rb', line 54 def down !up end |
#down! ⇒ Object
63 64 65 |
# File 'app/glimmer_metronome/model/beat.rb', line 63 def down! self.down = true end |
#down=(is_down) ⇒ Object
50 51 52 |
# File 'app/glimmer_metronome/model/beat.rb', line 50 def down=(is_down) self.up = !is_down end |
#off ⇒ Object Also known as: off?
37 38 39 |
# File 'app/glimmer_metronome/model/beat.rb', line 37 def off !on end |
#off! ⇒ Object
42 43 44 |
# File 'app/glimmer_metronome/model/beat.rb', line 42 def off! self.on = false end |
#off=(is_off) ⇒ Object
33 34 35 |
# File 'app/glimmer_metronome/model/beat.rb', line 33 def off=(is_off) self.on = !is_off end |
#on! ⇒ Object
46 47 48 |
# File 'app/glimmer_metronome/model/beat.rb', line 46 def on! self.on = true end |
#up! ⇒ Object
59 60 61 |
# File 'app/glimmer_metronome/model/beat.rb', line 59 def up! self.up = true end |