Class: Elisp::Comment

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

Overview

Copyright (C) 2025 gemmaro

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ Comment

Returns a new instance of Comment.



17
18
19
# File 'lib/elisp/comment.rb', line 17

def initialize(content)
  @content = content
end

Instance Method Details

#<<(content) ⇒ Object



21
22
23
# File 'lib/elisp/comment.rb', line 21

def <<(content)
  @content << "\n#{content}"
end

#htmlObject



29
30
31
# File 'lib/elisp/comment.rb', line 29

def html
  self.class.parse(@content)
end

#to_minor_paraObject



25
26
27
# File 'lib/elisp/comment.rb', line 25

def to_minor_para
  Elisp::MinorPara.new(@content)
end