Class: Hotdog::Expression::RegexpTagnameNode
- Inherits:
-
RegexpExpressionNode
- Object
- ExpressionNode
- TagExpressionNode
- RegexpExpressionNode
- Hotdog::Expression::RegexpTagnameNode
- Defined in:
- lib/hotdog/expression/semantics.rb
Instance Attribute Summary
Attributes inherited from TagExpressionNode
#separator, #tagname, #tagvalue
Instance Method Summary collapse
- #condition(options = {}) ⇒ Object
- #condition_tables(options = {}) ⇒ Object
- #condition_values(options = {}) ⇒ Object
-
#initialize(tagname, separator = nil, options = {}) ⇒ RegexpTagnameNode
constructor
A new instance of RegexpTagnameNode.
Methods inherited from RegexpExpressionNode
Methods inherited from TagExpressionNode
#==, #dump, #evaluate, #maybe_fallback, #maybe_glob, #maybe_query, #maybe_query_without_condition, #optimize, #separator?, #tagname?, #tagvalue?, #to_glob
Methods inherited from ExpressionNode
#==, #compact, #dump, #evaluate, #optimize
Constructor Details
#initialize(tagname, separator = nil, options = {}) ⇒ RegexpTagnameNode
Returns a new instance of RegexpTagnameNode.
1119 1120 1121 1122 1123 1124 1125 |
# File 'lib/hotdog/expression/semantics.rb', line 1119 def initialize(tagname, separator=nil, ={}) case tagname when /\A\/(.*)\/\z/ tagname = $1 end super(tagname.to_s, nil, separator, ) end |
Instance Method Details
#condition(options = {}) ⇒ Object
1127 1128 1129 |
# File 'lib/hotdog/expression/semantics.rb', line 1127 def condition(={}) "tags.name REGEXP ?" end |
#condition_tables(options = {}) ⇒ Object
1131 1132 1133 |
# File 'lib/hotdog/expression/semantics.rb', line 1131 def condition_tables(={}) [:tags] end |
#condition_values(options = {}) ⇒ Object
1135 1136 1137 |
# File 'lib/hotdog/expression/semantics.rb', line 1135 def condition_values(={}) [tagname] end |