Class: Hotdog::Expression::RegexpHostOrTagNode
- Inherits:
-
RegexpExpressionNode
- Object
- ExpressionNode
- TagExpressionNode
- RegexpExpressionNode
- Hotdog::Expression::RegexpHostOrTagNode
- Defined in:
- lib/hotdog/expression/semantics.rb
Instance Attribute Summary
Attributes inherited from TagExpressionNode
#separator, #tagname, #tagvalue
Instance Method Summary collapse
- #condition(options = {}) ⇒ Object
- #condition_tables(options = {}) ⇒ Object
- #condition_values(options = {}) ⇒ Object
-
#initialize(tagname, separator = nil, options = {}) ⇒ RegexpHostOrTagNode
constructor
A new instance of RegexpHostOrTagNode.
Methods inherited from RegexpExpressionNode
Methods inherited from TagExpressionNode
#==, #dump, #evaluate, #maybe_fallback, #maybe_glob, #maybe_query, #maybe_query_without_condition, #optimize, #separator?, #tagname?, #tagvalue?, #to_glob
Methods inherited from ExpressionNode
#==, #compact, #dump, #evaluate, #optimize
Constructor Details
#initialize(tagname, separator = nil, options = {}) ⇒ RegexpHostOrTagNode
Returns a new instance of RegexpHostOrTagNode.
1163 1164 1165 |
# File 'lib/hotdog/expression/semantics.rb', line 1163 def initialize(tagname, separator=nil, ={}) super(tagname, nil, separator, ) end |
Instance Method Details
#condition(options = {}) ⇒ Object
1167 1168 1169 |
# File 'lib/hotdog/expression/semantics.rb', line 1167 def condition(={}) "hosts.name REGEXP ? OR tags.name REGEXP ? OR tags.value REGEXP ?" end |
#condition_tables(options = {}) ⇒ Object
1171 1172 1173 |
# File 'lib/hotdog/expression/semantics.rb', line 1171 def condition_tables(={}) [:hosts, :tags] end |
#condition_values(options = {}) ⇒ Object
1175 1176 1177 |
# File 'lib/hotdog/expression/semantics.rb', line 1175 def condition_values(={}) [tagname, tagname, tagname] end |