Class: Deadfire::FrontEnd::SelectorNode
- Defined in:
- lib/deadfire/front_end/selector_node.rb
Instance Attribute Summary collapse
-
#mixin_name ⇒ Object
readonly
Returns the value of attribute mixin_name.
-
#selector ⇒ Object
readonly
Returns the value of attribute selector.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #cacheable? ⇒ Boolean
-
#initialize(tokens) ⇒ SelectorNode
constructor
A new instance of SelectorNode.
Constructor Details
#initialize(tokens) ⇒ SelectorNode
Returns a new instance of SelectorNode.
8 9 10 11 |
# File 'lib/deadfire/front_end/selector_node.rb', line 8 def initialize(tokens) @selector = tokens_to_selector(tokens) @mixin_name = fetch_mixin_name_from(tokens) end |
Instance Attribute Details
#mixin_name ⇒ Object (readonly)
Returns the value of attribute mixin_name.
6 7 8 |
# File 'lib/deadfire/front_end/selector_node.rb', line 6 def mixin_name @mixin_name end |
#selector ⇒ Object (readonly)
Returns the value of attribute selector.
6 7 8 |
# File 'lib/deadfire/front_end/selector_node.rb', line 6 def selector @selector end |
Instance Method Details
#accept(visitor) ⇒ Object
13 14 15 |
# File 'lib/deadfire/front_end/selector_node.rb', line 13 def accept(visitor) visitor.visit_selector_node(self) end |
#cacheable? ⇒ Boolean
17 18 19 |
# File 'lib/deadfire/front_end/selector_node.rb', line 17 def cacheable? selector.start_with?(".") end |