Class: Predicated::TreetopUrlPart::OperationNode
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- Predicated::TreetopUrlPart::OperationNode
- Defined in:
- lib/predicated/from/url_part.rb
Constant Summary collapse
- SIGN_TO_PREDICATE_CLASS =
{ "=" => Equal, ">" => GreaterThan, "<" => LessThan, ">=" => GreaterThanOrEqualTo, "<=" => LessThanOrEqualTo }
Instance Method Summary collapse
Instance Method Details
#left_text ⇒ Object
58 |
# File 'lib/predicated/from/url_part.rb', line 58 def left_text; elements[0].text_value end |
#right_text ⇒ Object
60 |
# File 'lib/predicated/from/url_part.rb', line 60 def right_text; elements[2].text_value end |
#sign_text ⇒ Object
59 |
# File 'lib/predicated/from/url_part.rb', line 59 def sign_text; elements[1].text_value end |
#to_predicate ⇒ Object
70 71 72 |
# File 'lib/predicated/from/url_part.rb', line 70 def to_predicate SIGN_TO_PREDICATE_CLASS[sign_text].new(left_text, right_text) end |