Class: HamdownCore::Ast::Script
- Inherits:
-
Struct
- Object
- Struct
- HamdownCore::Ast::Script
- Includes:
- HasChildren
- Defined in:
- lib/hamdown_core/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.
-
#keyword ⇒ Object
Returns the value of attribute keyword.
-
#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.
92 93 94 95 96 97 98 99 100 |
# File 'lib/hamdown_core/ast.rb', line 92 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
81 82 83 |
# File 'lib/hamdown_core/ast.rb', line 81 def children @children end |
#escape_html ⇒ Object
Returns the value of attribute escape_html
81 82 83 |
# File 'lib/hamdown_core/ast.rb', line 81 def escape_html @escape_html end |
#filename ⇒ Object
Returns the value of attribute filename
81 82 83 |
# File 'lib/hamdown_core/ast.rb', line 81 def filename @filename end |
#keyword ⇒ Object
Returns the value of attribute keyword
81 82 83 |
# File 'lib/hamdown_core/ast.rb', line 81 def keyword @keyword end |
#lineno ⇒ Object
Returns the value of attribute lineno
81 82 83 |
# File 'lib/hamdown_core/ast.rb', line 81 def lineno @lineno end |
#preserve ⇒ Object
Returns the value of attribute preserve
81 82 83 |
# File 'lib/hamdown_core/ast.rb', line 81 def preserve @preserve end |
#script ⇒ Object
Returns the value of attribute script
81 82 83 |
# File 'lib/hamdown_core/ast.rb', line 81 def script @script end |
Instance Method Details
#to_h ⇒ Object
102 103 104 |
# File 'lib/hamdown_core/ast.rb', line 102 def to_h super.merge(type: 'script') end |