Class: SyntaxTree::CSS::CSSStyleSheet
- Defined in:
- lib/syntax_tree/css/nodes.rb
Overview
This is the top node in the tree if it has been converted into a CSS stylesheet.
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(rules:, location:) ⇒ CSSStyleSheet
constructor
A new instance of CSSStyleSheet.
Methods inherited from Node
Constructor Details
#initialize(rules:, location:) ⇒ CSSStyleSheet
359 360 361 362 |
# File 'lib/syntax_tree/css/nodes.rb', line 359 def initialize(rules:, location:) @rules = rules @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
357 358 359 |
# File 'lib/syntax_tree/css/nodes.rb', line 357 def location @location end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
357 358 359 |
# File 'lib/syntax_tree/css/nodes.rb', line 357 def rules @rules end |
Instance Method Details
#accept(visitor) ⇒ Object
364 365 366 |
# File 'lib/syntax_tree/css/nodes.rb', line 364 def accept(visitor) visitor.visit_css_stylesheet(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
368 369 370 |
# File 'lib/syntax_tree/css/nodes.rb', line 368 def child_nodes rules end |
#deconstruct_keys(keys) ⇒ Object
374 375 376 |
# File 'lib/syntax_tree/css/nodes.rb', line 374 def deconstruct_keys(keys) { rules: rules, location: location } end |