Class: HamdownCore::Ast::HtmlComment
- Inherits:
-
Struct
- Object
- Struct
- HamdownCore::Ast::HtmlComment
- Includes:
- HasChildren
- Defined in:
- lib/hamdown_core/ast.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#conditional ⇒ Object
Returns the value of attribute conditional.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#lineno ⇒ Object
Returns the value of attribute lineno.
Instance Method Summary collapse
-
#initialize ⇒ HtmlComment
constructor
A new instance of HtmlComment.
- #to_h ⇒ Object
Methods included from HasChildren
Constructor Details
#initialize ⇒ HtmlComment
Returns a new instance of HtmlComment.
118 119 120 121 122 |
# File 'lib/hamdown_core/ast.rb', line 118 def initialize(*) super self.comment ||= '' self.conditional ||= '' end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children
115 116 117 |
# File 'lib/hamdown_core/ast.rb', line 115 def children @children end |
#comment ⇒ Object
Returns the value of attribute comment
115 116 117 |
# File 'lib/hamdown_core/ast.rb', line 115 def comment @comment end |
#conditional ⇒ Object
Returns the value of attribute conditional
115 116 117 |
# File 'lib/hamdown_core/ast.rb', line 115 def conditional @conditional end |
#filename ⇒ Object
Returns the value of attribute filename
115 116 117 |
# File 'lib/hamdown_core/ast.rb', line 115 def filename @filename end |
#lineno ⇒ Object
Returns the value of attribute lineno
115 116 117 |
# File 'lib/hamdown_core/ast.rb', line 115 def lineno @lineno end |
Instance Method Details
#to_h ⇒ Object
124 125 126 |
# File 'lib/hamdown_core/ast.rb', line 124 def to_h super.merge(type: 'html_comment') end |