Class: Hotdog::Commands::Search::RegexpTagValueNode
- Inherits:
-
RegexpExpressionNode
- Object
- ExpressionNode
- TagExpressionNode
- RegexpExpressionNode
- Hotdog::Commands::Search::RegexpTagValueNode
- 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(attribute, separator = nil) ⇒ RegexpTagValueNode
constructor
A new instance of RegexpTagValueNode.
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(attribute, separator = nil) ⇒ RegexpTagValueNode
Returns a new instance of RegexpTagValueNode.
1330 1331 1332 |
# File 'lib/hotdog/commands/search.rb', line 1330 def initialize(attribute, separator=nil) super(nil, attribute, separator) end |
Instance Method Details
#condition(options = {}) ⇒ Object
1334 1335 1336 |
# File 'lib/hotdog/commands/search.rb', line 1334 def condition(={}) "hosts.name REGEXP ? OR tags.value REGEXP ?" end |
#condition_tables(options = {}) ⇒ Object
1338 1339 1340 |
# File 'lib/hotdog/commands/search.rb', line 1338 def condition_tables(={}) [:hosts, :tags] end |
#condition_values(options = {}) ⇒ Object
1342 1343 1344 |
# File 'lib/hotdog/commands/search.rb', line 1342 def condition_values(={}) [attribute, attribute] end |