Class: Middleman::Sitemap::Queryable::Selector

Inherits:
Object
  • Object
show all
Defined in:
lib/middleman-core/sitemap/queryable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Selector

Returns a new instance of Selector.



124
125
126
127
128
129
# File 'lib/middleman-core/sitemap/queryable.rb', line 124

def initialize(opts={})
  unless VALID_OPERATORS.include? opts[:operator]
    raise OperatorNotSupportedError
  end
  @attribute, @operator = opts[:attribute], opts[:operator]
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



122
123
124
# File 'lib/middleman-core/sitemap/queryable.rb', line 122

def attribute
  @attribute
end

#operatorObject (readonly)

Returns the value of attribute operator.



122
123
124
# File 'lib/middleman-core/sitemap/queryable.rb', line 122

def operator
  @operator
end