Class: Facwparser::Element::ColorMacroStart

Inherits:
MacroBase show all
Defined in:
lib/facwparser/element.rb

Instance Attribute Summary collapse

Attributes inherited from ElementBase

#children, #source

Instance Method Summary collapse

Methods inherited from ElementBase

#==, #render_text

Constructor Details

#initialize(source, options) ⇒ ColorMacroStart

Returns a new instance of ColorMacroStart.



323
324
325
326
# File 'lib/facwparser/element.rb', line 323

def initialize(source, options)
  super(source)
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



322
323
324
# File 'lib/facwparser/element.rb', line 322

def options
  @options
end

Instance Method Details

#render_html(options) ⇒ Object



327
328
329
# File 'lib/facwparser/element.rb', line 327

def render_html(options)
  return '<span style="color: ' + CGI.escapeHTML(@options) +'">'
end