Class: Braintree::AdvancedSearch::SearchNode
- Inherits:
-
Object
- Object
- Braintree::AdvancedSearch::SearchNode
- Defined in:
- lib/braintree/advanced_search.rb
Direct Known Subclasses
EndsWithNode, IsNode, KeyValueNode, MultipleValueNode, RangeNode
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, parent) ⇒ SearchNode
constructor
A new instance of SearchNode.
Constructor Details
#initialize(name, parent) ⇒ SearchNode
Returns a new instance of SearchNode.
12 13 14 |
# File 'lib/braintree/advanced_search.rb', line 12 def initialize(name, parent) @node_name, @parent = name, parent end |
Class Method Details
.operators(*operator_names) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/braintree/advanced_search.rb', line 4 def self.operators(*operator_names) operator_names.each do |operator| define_method(operator) do |value| @parent.add_criteria(@node_name, operator => value.to_s) end end end |