Class: Wallaby::Parser
- Inherits:
-
Parslet::Parser
- Object
- Parslet::Parser
- Wallaby::Parser
- Defined in:
- lib/parsers/wallaby/parser.rb
Overview
A parser to parse colon query string and return a hash for transformer to consume
Instance Method Summary collapse
-
#parse(str) ⇒ Hash
Parse string into Abstract Syntax Tree for transformer to consume.
-
#stri(str) ⇒ Object
Case insensitive string match.
Instance Method Details
#parse(str) ⇒ Hash
Parse string into Abstract Syntax Tree for transformer to consume
|
# File 'lib/parsers/wallaby/parser.rb', line 7
|
#stri(str) ⇒ Object
Case insensitive string match
14 15 16 |
# File 'lib/parsers/wallaby/parser.rb', line 14 def stri(str) str.chars.map! { |c| match["#{c.upcase}#{c.downcase}"] }.reduce :>> end |