Class: Instrumental::Notice
- Inherits:
-
Struct
- Object
- Struct
- Instrumental::Notice
- Defined in:
- lib/instrumental/command_structs.rb
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#note ⇒ Object
Returns the value of attribute note.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(note, time, duration) ⇒ Notice
constructor
A new instance of Notice.
- #to_s ⇒ Object
Constructor Details
#initialize(note, time, duration) ⇒ Notice
Returns a new instance of Notice.
24 25 26 |
# File 'lib/instrumental/command_structs.rb', line 24 def initialize(note, time, duration) super(note, time.to_i, duration.to_i) end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration
23 24 25 |
# File 'lib/instrumental/command_structs.rb', line 23 def duration @duration end |
#note ⇒ Object
Returns the value of attribute note
23 24 25 |
# File 'lib/instrumental/command_structs.rb', line 23 def note @note end |
#time ⇒ Object
Returns the value of attribute time
23 24 25 |
# File 'lib/instrumental/command_structs.rb', line 23 def time @time end |
Instance Method Details
#to_s ⇒ Object
28 29 30 |
# File 'lib/instrumental/command_structs.rb', line 28 def to_s ["notice".freeze, time, duration, note].map(&:to_s).join(" ") end |