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, #tag_name, #tag_value
Instance Method Summary collapse
- #condition(options = {}) ⇒ Object
- #condition_tables(options = {}) ⇒ Object
- #condition_values(options = {}) ⇒ Object
-
#initialize(tag_name, separator = nil) ⇒ 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, #reload, #separator?, #tag_name?, #tag_value?, #to_glob
Methods inherited from ExpressionNode
Constructor Details
#initialize(tag_name, separator = nil) ⇒ RegexpTagNameNode
Returns a new instance of RegexpTagNameNode.
1072 1073 1074 1075 1076 1077 1078 |
# File 'lib/hotdog/expression/semantics.rb', line 1072 def initialize(tag_name, separator=nil) case tag_name when /\A\/(.*)\/\z/ tag_name = $1 end super(tag_name.to_s, nil, separator) end |
Instance Method Details
#condition(options = {}) ⇒ Object
1080 1081 1082 |
# File 'lib/hotdog/expression/semantics.rb', line 1080 def condition(={}) "tags.name REGEXP ?" end |
#condition_tables(options = {}) ⇒ Object
1084 1085 1086 |
# File 'lib/hotdog/expression/semantics.rb', line 1084 def condition_tables(={}) [:tags] end |
#condition_values(options = {}) ⇒ Object
1088 1089 1090 |
# File 'lib/hotdog/expression/semantics.rb', line 1088 def condition_values(={}) [tag_name] end |