Class: HParser::Inline::Comment
- Inherits:
-
Object
- Object
- HParser::Inline::Comment
- Includes:
- Collectable
- Defined in:
- lib/hparser/html.rb,
lib/hparser/text.rb,
lib/hparser/latex.rb,
lib/hparser/inline/comment.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Class Method Summary collapse
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize(content) ⇒ Comment
constructor
A new instance of Comment.
- #to_html ⇒ Object
- #to_latex ⇒ Object
- #to_text ⇒ Object
Constructor Details
#initialize(content) ⇒ Comment
Returns a new instance of Comment.
18 19 20 |
# File 'lib/hparser/inline/comment.rb', line 18 def initialize(content) @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
10 11 12 |
# File 'lib/hparser/inline/comment.rb', line 10 def content @content end |
Class Method Details
.parse(scanner, context = nil) ⇒ Object
12 13 14 15 16 |
# File 'lib/hparser/inline/comment.rb', line 12 def self.parse(scanner, context=nil) if scanner.scan(/<!--.+-->/m) self.new(scanner.matched[4..-4]) end end |
Instance Method Details
#==(o) ⇒ Object
22 23 24 |
# File 'lib/hparser/inline/comment.rb', line 22 def ==(o) o.class == self.class and @content == o.content end |
#to_html ⇒ Object
339 340 341 |
# File 'lib/hparser/html.rb', line 339 def to_html "" end |
#to_latex ⇒ Object
266 267 268 |
# File 'lib/hparser/latex.rb', line 266 def to_latex "" end |
#to_text ⇒ Object
174 175 176 |
# File 'lib/hparser/text.rb', line 174 def to_text "" end |