Class: HamlParser::Ast::HtmlComment
- Inherits:
-
Struct
- Object
- Struct
- HamlParser::Ast::HtmlComment
- Includes:
- HasChildren
- Defined in:
- lib/haml_parser/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.
108 109 110 111 112 |
# File 'lib/haml_parser/ast.rb', line 108 def initialize(*) super self.comment ||= '' self.conditional ||= '' end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children
105 106 107 |
# File 'lib/haml_parser/ast.rb', line 105 def children @children end |
#comment ⇒ Object
Returns the value of attribute comment
105 106 107 |
# File 'lib/haml_parser/ast.rb', line 105 def comment @comment end |
#conditional ⇒ Object
Returns the value of attribute conditional
105 106 107 |
# File 'lib/haml_parser/ast.rb', line 105 def conditional @conditional end |
#filename ⇒ Object
Returns the value of attribute filename
105 106 107 |
# File 'lib/haml_parser/ast.rb', line 105 def filename @filename end |
#lineno ⇒ Object
Returns the value of attribute lineno
105 106 107 |
# File 'lib/haml_parser/ast.rb', line 105 def lineno @lineno end |
Instance Method Details
#to_h ⇒ Object
114 115 116 |
# File 'lib/haml_parser/ast.rb', line 114 def to_h super.merge(type: 'html_comment') end |