Class: Hotdog::Commands::Search::RegexpHostNode

Inherits:
RegexpExpressionNode show all
Defined in:
lib/hotdog/commands/search.rb

Instance Attribute Summary

Attributes inherited from TagExpressionNode

#attribute, #identifier, #separator

Instance Method Summary collapse

Methods inherited from RegexpExpressionNode

#dump

Methods inherited from TagExpressionNode

#==, #attribute?, #dump, #evaluate, #identifier?, #maybe_fallback, #maybe_glob, #maybe_query, #maybe_query_without_condition, #optimize, #reload, #separator?, #to_glob

Methods inherited from ExpressionNode

#dump, #evaluate, #intermediates, #leafs, #optimize

Constructor Details

#initialize(attribute, separator = nil) ⇒ RegexpHostNode

Returns a new instance of RegexpHostNode.



1244
1245
1246
# File 'lib/hotdog/commands/search.rb', line 1244

def initialize(attribute, separator=nil)
  super("host", attribute, separator)
end

Instance Method Details

#condition(options = {}) ⇒ Object



1248
1249
1250
# File 'lib/hotdog/commands/search.rb', line 1248

def condition(options={})
  "hosts.name REGEXP ?"
end

#condition_tables(options = {}) ⇒ Object



1252
1253
1254
# File 'lib/hotdog/commands/search.rb', line 1252

def condition_tables(options={})
  [:hosts]
end

#condition_values(options = {}) ⇒ Object



1256
1257
1258
# File 'lib/hotdog/commands/search.rb', line 1256

def condition_values(options={})
  [attribute]
end