Class: Hotdog::Expression::RegexpNode

Inherits:
RegexpExpressionNode show all
Defined in:
lib/hotdog/expression/semantics.rb

Instance Attribute Summary

Attributes inherited from TagExpressionNode

#separator, #tag_name, #tag_value

Instance Method Summary collapse

Methods inherited from RegexpExpressionNode

#dump

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

#dump, #evaluate, #optimize

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(options={})
  "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(options={})
  [:hosts, :tags]
end

#condition_values(options = {}) ⇒ Object



1128
1129
1130
# File 'lib/hotdog/expression/semantics.rb', line 1128

def condition_values(options={})
  [tag_name, tag_name, tag_name]
end