Class: MiniCSS::AST::Decl

Inherits:
Object
  • Object
show all
Defined in:
lib/minicss/ast/decl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#importantObject

Returns the value of attribute important.



6
7
8
# File 'lib/minicss/ast/decl.rb', line 6

def important
  @important
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/minicss/ast/decl.rb', line 6

def name
  @name
end

#valueObject

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

Returns:

  • (Boolean)


14
# File 'lib/minicss/ast/decl.rb', line 14

def important? = important