Class: MiniCSS::AST::Decl
- Inherits:
-
Object
- Object
- MiniCSS::AST::Decl
- Defined in:
- lib/minicss/ast/decl.rb
Instance Attribute Summary collapse
-
#important ⇒ Object
Returns the value of attribute important.
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #important? ⇒ Boolean
-
#initialize(decl) ⇒ Decl
constructor
A new instance of Decl.
Constructor Details
#initialize(decl) ⇒ Decl
Returns a new instance of Decl.
8 9 10 11 12 |
# File 'lib/minicss/ast/decl.rb', line 8 def initialize(decl) @name = decl.name.literal @value = decl.value.map { AST.convert(it) } @important = decl.important end |
Instance Attribute Details
#important ⇒ Object
Returns the value of attribute important.
6 7 8 |
# File 'lib/minicss/ast/decl.rb', line 6 def important @important end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/minicss/ast/decl.rb', line 6 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
6 7 8 |
# File 'lib/minicss/ast/decl.rb', line 6 def value @value end |
Instance Method Details
#important? ⇒ Boolean
14 |
# File 'lib/minicss/ast/decl.rb', line 14 def important? = important |