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.
82 83 84 |
# File 'lib/elisp.rb', line 82 def initialize(content) @content = content end |
Instance Method Details
#<<(content) ⇒ Object
86 87 88 |
# File 'lib/elisp.rb', line 86 def <<(content) @content << "\n#{content}" end |
#html ⇒ Object
90 91 92 93 |
# File 'lib/elisp.rb', line 90 def html content = CGI.escape_html(@content) %(<pre class="code"><code>#{content}</code></pre>) end |