Class: Plate::AttributableNode

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

Direct Known Subclasses

ImageNode, LinkNode

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Inspector

#inspect_with

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes

Returns:

  • (Object)

    the current value of attributes



79
80
81
# File 'lib/plate/nodes.rb', line 79

def attributes
  @attributes
end

Instance Method Details

#compile_attributes(compiler) ⇒ Object



233
234
235
236
# File 'lib/plate/compiler.rb', line 233

def compile_attributes(compiler)
  attr = " #{attributes.map { |a| a.compile(compiler) }.join(' ')}"
  attr.gsub(/\A\s+\z/, '')
end