Class: Hotdog::Commands::Search::RegexpTagNode
- Inherits:
-
RegexpExpressionNode
- Object
- ExpressionNode
- TagExpressionNode
- RegexpExpressionNode
- Hotdog::Commands::Search::RegexpTagNode
- 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, attribute, separator = nil) ⇒ RegexpTagNode
constructor
A new instance of RegexpTagNode.
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, attribute, separator = nil) ⇒ RegexpTagNode
Returns a new instance of RegexpTagNode.
1262 1263 1264 |
# File 'lib/hotdog/commands/search.rb', line 1262 def initialize(identifier, attribute, separator=nil) super(identifier, attribute, separator) end |
Instance Method Details
#condition(options = {}) ⇒ Object
1266 1267 1268 |
# File 'lib/hotdog/commands/search.rb', line 1266 def condition(={}) "tags.name REGEXP ? AND tags.value REGEXP ?" end |
#condition_tables(options = {}) ⇒ Object
1270 1271 1272 |
# File 'lib/hotdog/commands/search.rb', line 1270 def condition_tables(={}) [:tags] end |
#condition_values(options = {}) ⇒ Object
1274 1275 1276 |
# File 'lib/hotdog/commands/search.rb', line 1274 def condition_values(={}) [identifier, attribute] end |