module Anchord

Constants

VERSION

Attributes

library[W]
tuning[W]

Public Class Methods

chord(tuning=Anchord.tuning, &block) click to toggle source
# File lib/anchord.rb, line 13
def chord(tuning=Anchord.tuning, &block)
  Chord.new(tuning, &block)
end
chord_files() click to toggle source
# File lib/anchord.rb, line 30
def chord_files
  Dir[File.dirname(__FILE__) + '/anchord/chords/**/*_chords.rb']
end
library() click to toggle source
# File lib/anchord.rb, line 9
def library
  @library ||= Library.load_from_chord_files
end
play(chord_sym) click to toggle source
# File lib/anchord.rb, line 21
def play(chord_sym)
  chord = library[chord_sym]
  unless chord
    puts "We cannot find the chord '#{chord_sym}' in our chord library."
  else
    puts Anchord::Fretboard.play_as_tab chord
  end
end
tuning() click to toggle source
# File lib/anchord.rb, line 17
def tuning
  @tuning ||= Tuning.standard
end