Class: Appfuel::Repository::ExprParser
- Inherits:
-
Parslet::Parser
- Object
- Parslet::Parser
- Appfuel::Repository::ExprParser
- Defined in:
- lib/appfuel/storage/repository/expr_parser.rb
Overview
A PEG (Parser Expression Grammer) parser for our domain language. This gives us the ablity to describe the filtering we would like to do when searching on a given domain entity. The search string is parsed and transformed into an interface that repositories can use to determine how to search a given storage interface. The language always represent the business domain entities and not a storage system.
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#stri(str) ⇒ Object
179 180 181 182 183 184 |
# File 'lib/appfuel/storage/repository/expr_parser.rb', line 179 def stri(str) key_chars = str.split(//) key_chars.collect! {|char| match["#{char.upcase}#{char.downcase}"] }.reduce(:>>) end |