Class: Plate::StyleNode

Inherits:
Struct
  • Object
show all
Defined in:
lib/plate/nodes.rb,
lib/plate/compiler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributeObject

Returns the value of attribute attribute

Returns:

  • (Object)

    the current value of attribute



19
20
21
# File 'lib/plate/nodes.rb', line 19

def attribute
  @attribute
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



19
20
21
# File 'lib/plate/nodes.rb', line 19

def value
  @value
end

Instance Method Details

#compile(compiler, parent = nil) ⇒ Object



113
114
115
116
# File 'lib/plate/compiler.rb', line 113

def compile(compiler, parent = nil)
  parent.styles << "#{attribute}: #{value.compile(compiler, self)}"
  ''
end