Class: Less2Sass::Less::Tree::SelectorNode
- Defined in:
- lib/less2sass/less/tree/selector_node.rb
Overview
Represents the full selector of a given RulesetNode.
No equivalent node is present in Sass, it’s the ‘rule` member of Sass::Tree::PropNode, instead.
Instance Attribute Summary collapse
-
#condition ⇒ Object
Returns the value of attribute condition.
- #currentFileInfo ⇒ Hash
- #elements ⇒ Array<Tree::ElementNode>
- #evaldCondition ⇒ Boolean
-
#extendList ⇒ Object
Returns the value of attribute extendList.
Attributes inherited from Node
#children, #has_children, #has_parent, #line, #parent, #ref_vars
Instance Method Summary collapse
-
#to_sass ⇒ Object
see Node#to_sass.
Methods inherited from Node
#<<, #==, #contains_variables?, #creates_context?, #each, #get_referenced_variable_names, #initialize, #transform
Constructor Details
This class inherits a constructor from Less2Sass::Less::Tree::Node
Instance Attribute Details
#condition ⇒ Object
Returns the value of attribute condition.
12 13 14 |
# File 'lib/less2sass/less/tree/selector_node.rb', line 12 def condition @condition end |
#currentFileInfo ⇒ Hash
14 15 16 |
# File 'lib/less2sass/less/tree/selector_node.rb', line 14 def currentFileInfo @currentFileInfo end |
#elements ⇒ Array<Tree::ElementNode>
10 11 12 |
# File 'lib/less2sass/less/tree/selector_node.rb', line 10 def elements @elements end |
#evaldCondition ⇒ Boolean
16 17 18 |
# File 'lib/less2sass/less/tree/selector_node.rb', line 16 def evaldCondition @evaldCondition end |
#extendList ⇒ Object
Returns the value of attribute extendList.
11 12 13 |
# File 'lib/less2sass/less/tree/selector_node.rb', line 11 def extendList @extendList end |
Instance Method Details
#to_sass ⇒ Object
see Node#to_sass
19 20 21 22 23 |
# File 'lib/less2sass/less/tree/selector_node.rb', line 19 def to_sass raise UnknownError if @elements.nil? return @elements.to_sass unless @elements.is_a?(Array) @elements.inject([]) { |selector, element| selector << element.to_sass } end |