Class: Less2Sass::Less::Tree::DirectiveNode
- Defined in:
- lib/less2sass/less/tree/directive_node.rb
Overview
Sits on a new line.
Represents a static CSS directive.
Examples:
- @charset
- @namespace
- @keyframes
- @counter-style
- @document
- @supports
The Sass equivalent is Sass::Tree::DirectiveNode.
Instance Attribute Summary collapse
-
#currentFileInfo ⇒ Object
Returns the value of attribute currentFileInfo.
-
#debugInfo ⇒ Object
Returns the value of attribute debugInfo.
-
#index ⇒ Object
Returns the value of attribute index.
-
#isRooted ⇒ Object
Returns the value of attribute isRooted.
-
#name ⇒ Object
Returns the value of attribute name.
-
#rules ⇒ Object
Returns the value of attribute rules.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Node
#children, #has_children, #has_parent, #line, #parent, #ref_vars
Instance Method Summary collapse
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
#currentFileInfo ⇒ Object
Returns the value of attribute currentFileInfo.
22 23 24 |
# File 'lib/less2sass/less/tree/directive_node.rb', line 22 def currentFileInfo @currentFileInfo end |
#debugInfo ⇒ Object
Returns the value of attribute debugInfo.
23 24 25 |
# File 'lib/less2sass/less/tree/directive_node.rb', line 23 def debugInfo @debugInfo end |
#index ⇒ Object
Returns the value of attribute index.
21 22 23 |
# File 'lib/less2sass/less/tree/directive_node.rb', line 21 def index @index end |
#isRooted ⇒ Object
Returns the value of attribute isRooted.
24 25 26 |
# File 'lib/less2sass/less/tree/directive_node.rb', line 24 def isRooted @isRooted end |
#name ⇒ Object
Returns the value of attribute name.
18 19 20 |
# File 'lib/less2sass/less/tree/directive_node.rb', line 18 def name @name end |
#rules ⇒ Object
Returns the value of attribute rules.
20 21 22 |
# File 'lib/less2sass/less/tree/directive_node.rb', line 20 def rules @rules end |
#value ⇒ Object
Returns the value of attribute value.
19 20 21 |
# File 'lib/less2sass/less/tree/directive_node.rb', line 19 def value @value end |
Instance Method Details
#to_sass ⇒ ::Sass::Tree::DirectiveNode
28 29 30 31 32 |
# File 'lib/less2sass/less/tree/directive_node.rb', line 28 def to_sass node = node(::Sass::Tree::DirectiveNode.new(value), line(:new)) @rules.rules.each { |c| node << c.to_sass } # Not all children should be passed node end |