Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Redone fretboard addition

  • Loading branch information...
commit 5a93034867a0e385c433090841bc35bfd8ee2288 1 parent 620024b
@choan authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/fretboards/fretboard_collection.rb
View
8 lib/fretboards/fretboard_collection.rb
@@ -18,7 +18,13 @@ def add(dots, attrs = {})
fb
end
- def fretboard(dots, attrs = {})
+ def fretboard(dots, opts = {})
+ if opts.is_a? String
+ attrs = {}
+ attrs[:title] = opts
+ else
+ attrs = opts.dup
+ end
if dots.is_a? Fretboard
fb = dots
fb.title = attrs[:title] if attrs[:title]
Please sign in to comment.
Something went wrong with that request. Please try again.