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.
1079 1080 1081 |
# File 'lib/hotdog/expression/semantics.rb', line 1079 def initialize(tag_name, separator=nil) super(tag_name, separator) end |
Instance Method Details
#condition(options = {}) ⇒ Object
1083 1084 1085 |
# File 'lib/hotdog/expression/semantics.rb', line 1083 def condition(={}) "hosts.name REGEXP ? OR tags.name REGEXP ? OR tags.value REGEXP ?" end |
#condition_tables(options = {}) ⇒ Object
1087 1088 1089 |
# File 'lib/hotdog/expression/semantics.rb', line 1087 def condition_tables(={}) [:hosts, :tags] end |
#condition_values(options = {}) ⇒ Object
1091 1092 1093 |
# File 'lib/hotdog/expression/semantics.rb', line 1091 def condition_values(={}) [tag_name, tag_name, tag_name] end |