Class: Archaeopteryx::Scale
- Inherits:
-
Object
- Object
- Archaeopteryx::Scale
- Defined in:
- lib/scale.rb
Instance Attribute Summary (collapse)
-
- (Object) notes
Returns the value of attribute notes.
Instance Method Summary (collapse)
- - (Object) /(positions)
-
- (Scale) initialize(attributes)
constructor
A new instance of Scale.
Constructor Details
- (Scale) initialize(attributes)
A new instance of Scale
7 8 9 |
# File 'lib/scale.rb', line 7 def initialize(attributes) @notes = attributes[:notes] end |
Instance Attribute Details
- (Object) notes
Returns the value of attribute notes
6 7 8 |
# File 'lib/scale.rb', line 6 def notes @notes end |
Instance Method Details
- (Object) /(positions)
10 11 12 13 14 |
# File 'lib/scale.rb', line 10 def /(positions) positions.inject([]) do |notes_matching_positions, position| notes_matching_positions << @notes[position] end end |