Class: MiniCSS::CSS::AST::Function
- Inherits:
-
Object
- Object
- MiniCSS::CSS::AST::Function
- Defined in:
- lib/minicss/css/ast/function.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(name: "", value: nil) ⇒ Function
constructor
A new instance of Function.
- #kind ⇒ Object
- #literal ⇒ Object
Constructor Details
#initialize(name: "", value: nil) ⇒ Function
Returns a new instance of Function.
9 10 11 12 |
# File 'lib/minicss/css/ast/function.rb', line 9 def initialize(name: "", value: nil) @value = value || [] @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/minicss/css/ast/function.rb', line 7 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
7 8 9 |
# File 'lib/minicss/css/ast/function.rb', line 7 def value @value end |
Instance Method Details
#kind ⇒ Object
14 |
# File 'lib/minicss/css/ast/function.rb', line 14 def kind = :function |
#literal ⇒ Object
16 |
# File 'lib/minicss/css/ast/function.rb', line 16 def literal = [name.literal, value.map(&:literal), ")"].join |