Class: WTFChord::Collectors::Generic

Inherits:
WTFChord::Chord show all
Defined in:
lib/wtf_chord/collectors/generic.rb

Direct Known Subclasses

Guitar, Piano

Constant Summary

Constants inherited from WTFChord::Chord

WTFChord::Chord::BASS_MATCH

Instance Attribute Summary collapse

Attributes inherited from WTFChord::Chord

#bass, #name, #notes, #pitch, #steps

Instance Method Summary collapse

Methods inherited from WTFChord::Chord

#===, #bass?, #initialize, #inspect, #original_bass, #size, #third_tone, #tone

Constructor Details

This class inherits a constructor from WTFChord::Chord

Instance Attribute Details

#max_distObject

Returns the value of attribute max_dist.



9
10
11
# File 'lib/wtf_chord/collectors/generic.rb', line 9

def max_dist
  @max_dist
end

Instance Method Details

#callObject



15
16
17
18
# File 'lib/wtf_chord/collectors/generic.rb', line 15

def call
  reset!
  collect!
end

#collect!Object

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/wtf_chord/collectors/generic.rb', line 24

def collect!
  raise NotImplementedError
end

#fingeringsObject



11
12
13
# File 'lib/wtf_chord/collectors/generic.rb', line 11

def fingerings
  @fingerings ||= []
end

#reset!Object



20
21
22
# File 'lib/wtf_chord/collectors/generic.rb', line 20

def reset!
  fingerings.clear
end