Class: JPath::Parser::Predicate
- Inherits:
-
Object
- Object
- JPath::Parser::Predicate
- Defined in:
- lib/jpath/parser/formula.rb
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
Instance Method Summary collapse
-
#initialize(expression) ⇒ Predicate
constructor
A new instance of Predicate.
- #to_s ⇒ Object
- #true?(*args) ⇒ Boolean
Constructor Details
#initialize(expression) ⇒ Predicate
Returns a new instance of Predicate.
7 8 9 |
# File 'lib/jpath/parser/formula.rb', line 7 def initialize(expression) @expression = expression end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
5 6 7 |
# File 'lib/jpath/parser/formula.rb', line 5 def expression @expression end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/jpath/parser/formula.rb', line 15 def to_s "[%s]" % expression end |
#true?(*args) ⇒ Boolean
11 12 13 |
# File 'lib/jpath/parser/formula.rb', line 11 def true?(*args) expression.true?(*args) end |