Class: Facwparser::Element::CodeMacro
- Inherits:
-
MacroBase
- Object
- ElementBase
- MacroBase
- Facwparser::Element::CodeMacro
- Defined in:
- lib/facwparser/element.rb
Instance Attribute Summary
Attributes inherited from ElementBase
Instance Method Summary collapse
-
#initialize(source, options, value) ⇒ CodeMacro
constructor
A new instance of CodeMacro.
- #render_html(options) ⇒ Object
Methods inherited from ElementBase
Constructor Details
#initialize(source, options, value) ⇒ CodeMacro
Returns a new instance of CodeMacro.
204 205 206 207 208 |
# File 'lib/facwparser/element.rb', line 204 def initialize(source, , value) super(source) @options = @value = value end |
Instance Method Details
#render_html(options) ⇒ Object
209 210 211 212 |
# File 'lib/facwparser/element.rb', line 209 def render_html() "<pre class=\"#{CGI.escapeHTML(@options[1..-1])}\">" + render_html_by_name_and_value('code', @value) + "</pre>" + "\n" end |