Class: PicoTune::Melody
- Inherits:
-
Object
- Object
- PicoTune::Melody
- Defined in:
- lib/picotune.rb
Instance Attribute Summary collapse
-
#instrument ⇒ Object
readonly
Returns the value of attribute instrument.
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Instance Method Summary collapse
-
#initialize(instrument, pattern) ⇒ Melody
constructor
A new instance of Melody.
Constructor Details
#initialize(instrument, pattern) ⇒ Melody
437 438 439 440 441 442 443 |
# File 'lib/picotune.rb', line 437 def initialize instrument, pattern raise 'nil instrument' if instrument.nil? raise 'nil pattern' if pattern.nil? @instrument = instrument @pattern = pattern end |
Instance Attribute Details
#instrument ⇒ Object (readonly)
Returns the value of attribute instrument.
435 436 437 |
# File 'lib/picotune.rb', line 435 def instrument @instrument end |
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
435 436 437 |
# File 'lib/picotune.rb', line 435 def pattern @pattern end |