Class: DocumentMapper::Selector
- Defined in:
- lib/document_mapper/selector.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Selector
constructor
A new instance of Selector.
Constructor Details
#initialize(opts = {}) ⇒ Selector
Returns a new instance of Selector.
7 8 9 10 11 12 |
# File 'lib/document_mapper/selector.rb', line 7 def initialize(opts = {}) raise OperatorNotSupportedError unless VALID_OPERATORS.include? opts[:operator] @attribute = opts[:attribute] @operator = opts[:operator] end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
5 6 7 |
# File 'lib/document_mapper/selector.rb', line 5 def attribute @attribute end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
5 6 7 |
# File 'lib/document_mapper/selector.rb', line 5 def operator @operator end |