Class: Hotdog::Expression::RegexpTagValueNode
Instance Attribute Summary
#separator, #tag_name, #tag_value
Instance Method Summary
collapse
#dump
#==, #dump, #evaluate, #maybe_fallback, #maybe_glob, #maybe_query, #maybe_query_without_condition, #optimize, #reload, #separator?, #tag_name?, #tag_value?, #to_glob
#dump, #evaluate, #optimize
Constructor Details
#initialize(tag_value, separator = nil) ⇒ RegexpTagValueNode
1094
1095
1096
1097
1098
1099
1100
|
# File 'lib/hotdog/expression/semantics.rb', line 1094
def initialize(tag_value, separator=nil)
case tag_value
when /\A\/(.*)\/\z/
tag_value = $1
end
super(nil, tag_value.to_s, separator)
end
|
Instance Method Details
#condition(options = {}) ⇒ Object
1102
1103
1104
|
# File 'lib/hotdog/expression/semantics.rb', line 1102
def condition(options={})
"hosts.name REGEXP ? OR tags.value REGEXP ?"
end
|
#condition_tables(options = {}) ⇒ Object
1106
1107
1108
|
# File 'lib/hotdog/expression/semantics.rb', line 1106
def condition_tables(options={})
[:hosts, :tags]
end
|
#condition_values(options = {}) ⇒ Object
1110
1111
1112
|
# File 'lib/hotdog/expression/semantics.rb', line 1110
def condition_values(options={})
[tag_value, tag_value]
end
|