Class: Quercle::Predicate
- Inherits:
-
Object
- Object
- Quercle::Predicate
- Defined in:
- lib/quercle/predicate.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
Instance Method Summary collapse
-
#initialize(json) ⇒ Predicate
constructor
A new instance of Predicate.
- #to_a ⇒ Object
Constructor Details
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
3 4 5 |
# File 'lib/quercle/predicate.rb', line 3 def field @field end |
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
3 4 5 |
# File 'lib/quercle/predicate.rb', line 3 def operation @operation end |
Instance Method Details
#to_a ⇒ Object
9 10 11 |
# File 'lib/quercle/predicate.rb', line 9 def to_a ["#{field} #{operation.sql_fragment}", operation.value] end |