Class: HamlParser::Ast::Script
- Inherits:
-
Struct
- Object
- Struct
- HamlParser::Ast::Script
- Includes:
- HasChildren
- Defined in:
- lib/haml_parser/ast.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#escape_html ⇒ Object
Returns the value of attribute escape_html.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#lineno ⇒ Object
Returns the value of attribute lineno.
-
#preserve ⇒ Object
Returns the value of attribute preserve.
-
#script ⇒ Object
Returns the value of attribute script.
Instance Method Summary collapse
-
#initialize ⇒ Script
constructor
A new instance of Script.
- #to_h ⇒ Object
Methods included from HasChildren
Constructor Details
#initialize ⇒ Script
Returns a new instance of Script.
75 76 77 78 79 80 81 82 83 |
# File 'lib/haml_parser/ast.rb', line 75 def initialize(*) super if escape_html.nil? self.escape_html = true end if preserve.nil? self.preserve = false end end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children
65 66 67 |
# File 'lib/haml_parser/ast.rb', line 65 def children @children end |
#escape_html ⇒ Object
Returns the value of attribute escape_html
65 66 67 |
# File 'lib/haml_parser/ast.rb', line 65 def escape_html @escape_html end |
#filename ⇒ Object
Returns the value of attribute filename
65 66 67 |
# File 'lib/haml_parser/ast.rb', line 65 def filename @filename end |
#lineno ⇒ Object
Returns the value of attribute lineno
65 66 67 |
# File 'lib/haml_parser/ast.rb', line 65 def lineno @lineno end |
#preserve ⇒ Object
Returns the value of attribute preserve
65 66 67 |
# File 'lib/haml_parser/ast.rb', line 65 def preserve @preserve end |
#script ⇒ Object
Returns the value of attribute script
65 66 67 |
# File 'lib/haml_parser/ast.rb', line 65 def script @script end |
Instance Method Details
#to_h ⇒ Object
85 86 87 |
# File 'lib/haml_parser/ast.rb', line 85 def to_h super.merge(type: 'script') end |