Class: YADM::CriteriaParser::ExpressionParser
- Inherits:
-
Object
- Object
- YADM::CriteriaParser::ExpressionParser
- Defined in:
- lib/yadm/criteria_parser/expression_parser.rb
Defined Under Namespace
Modules: Operand Classes: Attribute, Expression
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(block) ⇒ ExpressionParser
constructor
A new instance of ExpressionParser.
- #method_missing(method_name, *args, &block) ⇒ Object
- #result ⇒ Object
Constructor Details
#initialize(block) ⇒ ExpressionParser
Returns a new instance of ExpressionParser.
6 7 8 |
# File 'lib/yadm/criteria_parser/expression_parser.rb', line 6 def initialize(block) @block = block end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
4 5 6 |
# File 'lib/yadm/criteria_parser/expression_parser.rb', line 4 def block @block end |
Class Method Details
.parse(block) ⇒ Object
19 20 21 |
# File 'lib/yadm/criteria_parser/expression_parser.rb', line 19 def parse(block) new(block).result end |
Instance Method Details
#result ⇒ Object
10 11 12 |
# File 'lib/yadm/criteria_parser/expression_parser.rb', line 10 def result instance_eval(&block).result end |