Class: Predicator::Predicates::Method
- Inherits:
-
Object
- Object
- Predicator::Predicates::Method
- Defined in:
- lib/predicator/predicates/method.rb
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, method) ⇒ Method
constructor
A new instance of Method.
- #satisfied?(context = Predicator::Context.new) ⇒ Boolean
Constructor Details
#initialize(value, method) ⇒ Method
Returns a new instance of Method.
6 7 8 9 |
# File 'lib/predicator/predicates/method.rb', line 6 def initialize value, method @value = value @method = method end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
4 5 6 |
# File 'lib/predicator/predicates/method.rb', line 4 def method @method end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/predicator/predicates/method.rb', line 4 def value @value end |
Instance Method Details
#satisfied?(context = Predicator::Context.new) ⇒ Boolean
11 12 13 14 |
# File 'lib/predicator/predicates/method.rb', line 11 def satisfied? context=Predicator::Context.new node = context.node_for value node.send method end |