Class: Middleman::Sitemap::Queryable::Selector
- Inherits:
-
Object
- Object
- Middleman::Sitemap::Queryable::Selector
- Defined in:
- lib/middleman-core/sitemap/queryable.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.
122 123 124 125 126 127 |
# File 'lib/middleman-core/sitemap/queryable.rb', line 122 def initialize(opts = {}) unless VALID_OPERATORS.include? opts[:operator] raise OperatorNotSupportedError end @attribute, @operator = opts[:attribute], opts[:operator] end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
120 121 122 |
# File 'lib/middleman-core/sitemap/queryable.rb', line 120 def attribute @attribute end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
120 121 122 |
# File 'lib/middleman-core/sitemap/queryable.rb', line 120 def operator @operator end |