Class: Hotdog::Expression::RegexpNode
- Inherits:
-
RegexpExpressionNode
- Object
- ExpressionNode
- TagExpressionNode
- RegexpExpressionNode
- Hotdog::Expression::RegexpNode
- Defined in:
- lib/hotdog/expression/semantics.rb
Instance Attribute Summary
Attributes inherited from TagExpressionNode
#separator, #tag_name, #tag_value
Instance Method Summary collapse
- #condition(options = {}) ⇒ Object
- #condition_tables(options = {}) ⇒ Object
- #condition_values(options = {}) ⇒ Object
-
#initialize(tag_name, separator = nil) ⇒ RegexpNode
constructor
A new instance of RegexpNode.
Methods inherited from RegexpExpressionNode
Methods inherited from TagExpressionNode
#==, #dump, #evaluate, #maybe_fallback, #maybe_glob, #maybe_query, #maybe_query_without_condition, #optimize, #reload, #separator?, #tag_name?, #tag_value?, #to_glob
Methods inherited from ExpressionNode
Constructor Details
#initialize(tag_name, separator = nil) ⇒ RegexpNode
Returns a new instance of RegexpNode.
1116 1117 1118 |
# File 'lib/hotdog/expression/semantics.rb', line 1116 def initialize(tag_name, separator=nil) super(tag_name, separator) end |
Instance Method Details
#condition(options = {}) ⇒ Object
1120 1121 1122 |
# File 'lib/hotdog/expression/semantics.rb', line 1120 def condition(={}) "hosts.name REGEXP ? OR tags.name REGEXP ? OR tags.value REGEXP ?" end |
#condition_tables(options = {}) ⇒ Object
1124 1125 1126 |
# File 'lib/hotdog/expression/semantics.rb', line 1124 def condition_tables(={}) [:hosts, :tags] end |
#condition_values(options = {}) ⇒ Object
1128 1129 1130 |
# File 'lib/hotdog/expression/semantics.rb', line 1128 def condition_values(={}) [tag_name, tag_name, tag_name] end |