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.
1298 1299 1300 |
# File 'lib/hotdog/commands/search.rb', line 1298 def initialize(attribute, separator=nil) super(nil, attribute, separator) end |
Instance Method Details
#condition(options = {}) ⇒ Object
1302 1303 1304 |
# File 'lib/hotdog/commands/search.rb', line 1302 def condition(={}) "hosts.name REGEXP ? OR tags.value REGEXP ?" end |
#condition_tables(options = {}) ⇒ Object
1306 1307 1308 |
# File 'lib/hotdog/commands/search.rb', line 1306 def condition_tables(={}) [:hosts, :tags] end |
#condition_values(options = {}) ⇒ Object
1310 1311 1312 |
# File 'lib/hotdog/commands/search.rb', line 1310 def condition_values(={}) [attribute, attribute] end |