Class: Archaeopteryx::Scale

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

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Scale) initialize(attributes)

Returns 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