Class: PM::Song

Inherits:
Object
  • Object
show all
Defined in:
lib/patchmaster/song.rb

Overview

A Song is a named list of Patches.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Song

Returns a new instance of Song.



8
9
10
11
12
# File 'lib/patchmaster/song.rb', line 8

def initialize(name)
  @name = name
  @patches = []
  PatchMaster.instance.all_songs << self
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/patchmaster/song.rb', line 6

def name
  @name
end

#notesObject

Returns the value of attribute notes.



6
7
8
# File 'lib/patchmaster/song.rb', line 6

def notes
  @notes
end

#patchesObject

Returns the value of attribute patches.



6
7
8
# File 'lib/patchmaster/song.rb', line 6

def patches
  @patches
end

Instance Method Details

#<<(patch) ⇒ Object



14
15
16
# File 'lib/patchmaster/song.rb', line 14

def <<(patch)
  @patches << patch
end