Class: Elisp::Variables

Inherits:
Object
  • Object
show all
Defined in:
lib/elisp.rb

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ Variables

Returns a new instance of Variables.



69
70
71
# File 'lib/elisp.rb', line 69

def initialize(content)
  @content = content
end

Instance Method Details

#htmlObject



73
74
75
76
77
78
79
80
81
# File 'lib/elisp.rb', line 73

def html
  content = CGI.escape_html(@content)
  <<~END_HTML
    <article>
      Header line variables:
      <pre class="code"><code>#{content}</code></pre>
    </article>
  END_HTML
end

#pandoc_json_objectObject



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/elisp.rb', line 83

def pandoc_json_object
  {
    "t": "Div",
    "c": [
      ["", ["header-line-variables"], []],
      [
        {
          "t": "CodeBlock",
          "c": [
            ["", ["emacs-lisp-header-line-variables"], []],
            @content,
          ],
        },
      ],
    ],
  }
end