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.



316
317
318
319
# File 'lib/facwparser/element.rb', line 316

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

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



315
316
317
# File 'lib/facwparser/element.rb', line 315

def options
  @options
end

Instance Method Details

#render_html(options) ⇒ Object



320
321
322
# File 'lib/facwparser/element.rb', line 320

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