Class: Hotdog::Commands::Search::RegexpNode
- Inherits:
-
RegexpExpressionNode
- Object
- ExpressionNode
- TagExpressionNode
- RegexpExpressionNode
- Hotdog::Commands::Search::RegexpNode
- Defined in:
- lib/hotdog/commands/search.rb
Instance Attribute Summary
Attributes inherited from TagExpressionNode
#attribute, #identifier, #separator
Instance Method Summary collapse
- #condition(options = {}) ⇒ Object
- #condition_tables(options = {}) ⇒ Object
- #condition_values(options = {}) ⇒ Object
-
#initialize(identifier, separator = nil) ⇒ RegexpNode
constructor
A new instance of RegexpNode.
Methods inherited from RegexpExpressionNode
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(identifier, separator = nil) ⇒ RegexpNode
Returns a new instance of RegexpNode.
1348 1349 1350 |
# File 'lib/hotdog/commands/search.rb', line 1348 def initialize(identifier, separator=nil) super(identifier, separator) end |
Instance Method Details
#condition(options = {}) ⇒ Object
1352 1353 1354 |
# File 'lib/hotdog/commands/search.rb', line 1352 def condition(={}) "hosts.name REGEXP ? OR tags.name REGEXP ? OR tags.value REGEXP ?" end |
#condition_tables(options = {}) ⇒ Object
1356 1357 1358 |
# File 'lib/hotdog/commands/search.rb', line 1356 def condition_tables(={}) [:hosts, :tags] end |
#condition_values(options = {}) ⇒ Object
1360 1361 1362 |
# File 'lib/hotdog/commands/search.rb', line 1360 def condition_values(={}) [identifier, identifier, identifier] end |