Class: Facwparser::Element::JiraMacro

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) ⇒ JiraMacro

Returns a new instance of JiraMacro.



304
305
306
307
# File 'lib/facwparser/element.rb', line 304

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

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



303
304
305
# File 'lib/facwparser/element.rb', line 303

def options
  @options
end

Instance Method Details

#render_html(options) ⇒ Object



308
309
310
311
# File 'lib/facwparser/element.rb', line 308

def render_html(options)
  jira_browse_url = (options && options['jira_browse_url']) || ''
  return '<a href="' + CGI.escapeHTML(jira_browse_url + @options) +'">' + CGI.escapeHTML(@options) + '</a>'
end