Class: Elisp::Code
- Inherits:
-
Object
- Object
- Elisp::Code
- Defined in:
- lib/elisp.rb
Instance Method Summary collapse
- #<<(content) ⇒ Object
- #html ⇒ Object
-
#initialize(content) ⇒ Code
constructor
A new instance of Code.
Constructor Details
#initialize(content) ⇒ Code
Returns a new instance of Code.
127 128 129 |
# File 'lib/elisp.rb', line 127 def initialize(content) @content = content end |
Instance Method Details
#<<(content) ⇒ Object
131 132 133 |
# File 'lib/elisp.rb', line 131 def <<(content) @content << "\n#{content}" end |
#html ⇒ Object
135 136 137 138 |
# File 'lib/elisp.rb', line 135 def html content = CGI.escape_html(@content) %(<pre class="code"><code>#{content}</code></pre>) end |