Class: Fretboard::Parser
- Inherits:
-
Object
- Object
- Fretboard::Parser
- Defined in:
- lib/fretboard/parser.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
#initialize(args) ⇒ Parser
Returns a new instance of Parser.
17 18 19 |
# File 'lib/fretboard/parser.rb', line 17 def initialize(args) @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
11 12 13 |
# File 'lib/fretboard/parser.rb', line 11 def args @args end |
Class Method Details
.parse(args) ⇒ Object
13 14 15 |
# File 'lib/fretboard/parser.rb', line 13 def self.parse(args) new(args).parse end |
Instance Method Details
#parse ⇒ Object
21 22 23 24 25 |
# File 'lib/fretboard/parser.rb', line 21 def parse parser.parse!(args) rescue StandardError => e Fretboard::Console.danger("Ambiguously completable string is encountered\n#{e}") end |