Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fretboard.semiterse is now Fretboard.terse

  • Loading branch information...
commit 68579cd00dae07b61e0794c0f20a7c529e5797ac 1 parent 75ac6b1
@choan authored
View
19 lib/fretboards/fretboard.rb
@@ -23,23 +23,8 @@ def configure(conf)
@conf.update(conf)
end
- def terse(s, opts = {})
- self.title = opts[:title] if opts[:title]
- parts = s.split("-")
- sc = index_to_string_number(0)
- parts.each do |p|
- attrs = {}
- attrs[:string] = sc
- attrs[:fret] = p[0..0].to_i
- attrs[:symbol] = :root if p.include?("!")
- # attrs[:symbol] = :phantom if p.include?("?")
- mark attrs
- sc -= 1
- end
- self
- end
-
- def semiterse(a, opts = {})
+ def terse(a, opts = {})
+ a = a.split(/\s+/) if a.is_a?(String)
self.title = opts[:title] if opts[:title]
barres = {}
a.each_with_index do |m, i|
View
10 lib/fretboards/fretboard_collection.rb
@@ -12,17 +12,9 @@ def initialize(settings = {})
def add(dots, attrs = {})
if dots.is_a? Fretboard
fb = dots
- if attrs[:title]
- fb.title = attrs[:title]
- end
else
fb = Fretboard.new(@opts)
- if dots.is_a? String
- fb.terse(dots, attrs)
- else
- fb.semiterse(dots, attrs)
- end
- # pp fb
+ fb.terse(dots, attrs)
end
@fbs << fb
fb
Please sign in to comment.
Something went wrong with that request. Please try again.