Class: Niki::Riff
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#notes ⇒ Object
readonly
Returns the value of attribute notes.
Instance Method Summary collapse
-
#initialize(name, song, &block) ⇒ Riff
constructor
A new instance of Riff.
- #note(*args) ⇒ Object
Methods included from Chords
Constructor Details
#initialize(name, song, &block) ⇒ Riff
Returns a new instance of Riff.
7 8 9 10 11 12 13 |
# File 'lib/niki/riff.rb', line 7 def initialize(name, song, &block) @name = name @song = song @notes = [] self.instance_exec(&block) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/niki/riff.rb', line 3 def name @name end |
#notes ⇒ Object (readonly)
Returns the value of attribute notes.
3 4 5 |
# File 'lib/niki/riff.rb', line 3 def notes @notes end |
Instance Method Details
#note(*args) ⇒ Object
15 16 17 |
# File 'lib/niki/riff.rb', line 15 def note(*args) @notes << args end |