Class: Elisp::Desc
- Inherits:
-
Object
- Object
- Elisp::Desc
- Defined in:
- lib/elisp.rb
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(content) ⇒ Desc
constructor
A new instance of Desc.
- #pandoc_json_object ⇒ Object
Constructor Details
#initialize(content) ⇒ Desc
Returns a new instance of Desc.
38 39 40 |
# File 'lib/elisp.rb', line 38 def initialize(content) @content = content end |
Instance Method Details
#html ⇒ Object
42 43 44 45 |
# File 'lib/elisp.rb', line 42 def html content = CGI.escape_html(@content) %(<p class="description">#{content}</p>) end |
#pandoc_json_object ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/elisp.rb', line 47 def pandoc_json_object { "t": "Div", "c": [ ["", ["description"], []], [ { "t": "Para", "c": [ { "t": "Str", "c": @content, }, ], }, ], ], } end |