Class: Niki::Riff

Inherits:
Object
  • Object
show all
Includes:
Chords
Defined in:
lib/niki/riff.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Chords

#silence

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

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/niki/riff.rb', line 3

def name
  @name
end

#notesObject (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