Class: Hotdog::Expression::RegexpHostNode
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) ⇒ RegexpHostNode
987
988
989
990
991
992
993
|
# File 'lib/hotdog/expression/semantics.rb', line 987
def initialize(tag_value, separator=nil)
case tag_value
when /\A\/(.*)\/\z/
tag_value = $1
end
super("host", tag_value, separator)
end
|
Instance Method Details
#condition(options = {}) ⇒ Object
995
996
997
|
# File 'lib/hotdog/expression/semantics.rb', line 995
def condition(options={})
"hosts.name REGEXP ?"
end
|
#condition_tables(options = {}) ⇒ Object
999
1000
1001
|
# File 'lib/hotdog/expression/semantics.rb', line 999
def condition_tables(options={})
[:hosts]
end
|
#condition_values(options = {}) ⇒ Object
1003
1004
1005
|
# File 'lib/hotdog/expression/semantics.rb', line 1003
def condition_values(options={})
[tag_value]
end
|