Class: Litter::Parsing::Parser
- Inherits:
-
Parslet::Parser
- Object
- Parslet::Parser
- Litter::Parsing::Parser
- Defined in:
- lib/litter/parsing/parser.rb
Overview
Example output from the example in parse_test.rb. Note: what looks like strings followed by “@” are actually Parslet::Slice.
[
:location=>"west wildwood"@12,
:items=>
[{:name=>"car mat"@26,
chair "@34, :quantity=>"2"@49, :tag=>"kept"@52,
bucket "@57, :location=>"bridge"@81]},
:items=>
[{:name=>"concrete-filled bucket "@98, :quantity=>"2"@122, :location=>"west wildwood "@125, :tag=>"TODO"@140,
cart "@145, :location=>"bridge"@160,
mat "@167, :tag=>"kept"@176]}]
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(config) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(config) ⇒ Parser
Returns a new instance of Parser.
22 23 24 25 |
# File 'lib/litter/parsing/parser.rb', line 22 def initialize(config) @config = config super() end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
19 20 21 |
# File 'lib/litter/parsing/parser.rb', line 19 def config @config end |