Class: Brief::DocumentMapper::Selector
- Inherits:
-
Object
- Object
- Brief::DocumentMapper::Selector
- Defined in:
- lib/brief/document_mapper.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.
21 22 23 24 25 26 27 |
# File 'lib/brief/document_mapper.rb', line 21 def initialize(opts = {}) unless Brief::DocumentMapper::VALID_OPERATORS.include?(opts[:operator]) fail 'Operator not supported' end @attribute, @operator = opts[:attribute], opts[:operator] end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
19 20 21 |
# File 'lib/brief/document_mapper.rb', line 19 def attribute @attribute end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
19 20 21 |
# File 'lib/brief/document_mapper.rb', line 19 def operator @operator end |