Class: Elisp::DocStringParser::Code
- Inherits:
-
Object
- Object
- Elisp::DocStringParser::Code
- Defined in:
- lib/elisp/doc_string_parser.rb
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(content) ⇒ Code
constructor
A new instance of Code.
- #pandoc_json_object ⇒ Object
Constructor Details
#initialize(content) ⇒ Code
Returns a new instance of Code.
122 123 124 |
# File 'lib/elisp/doc_string_parser.rb', line 122 def initialize(content) @content = content end |
Instance Method Details
#html ⇒ Object
126 127 128 129 |
# File 'lib/elisp/doc_string_parser.rb', line 126 def html code = CGI.escape_html(@content) "<code>#{code}</code>" end |
#pandoc_json_object ⇒ Object
131 132 133 134 135 136 137 138 139 |
# File 'lib/elisp/doc_string_parser.rb', line 131 def pandoc_json_object { "t": "Code", "c": [ ["", [], []], @content, ] } end |