Class: HamdownCore::Ast::BaseText
- Inherits:
-
Struct
- Object
- Struct
- HamdownCore::Ast::BaseText
- Defined in:
- lib/hamdown_core/ast.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#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.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize ⇒ BaseText
constructor
A new instance of BaseText.
- #markdownable? ⇒ Boolean
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ BaseText
Returns a new instance of BaseText.
138 139 140 141 142 143 |
# File 'lib/hamdown_core/ast.rb', line 138 def initialize(*) super if escape_html.nil? self.escape_html = true end end |
Instance Attribute Details
#escape_html ⇒ Object
Returns the value of attribute escape_html
137 138 139 |
# File 'lib/hamdown_core/ast.rb', line 137 def escape_html @escape_html end |
#filename ⇒ Object
Returns the value of attribute filename
137 138 139 |
# File 'lib/hamdown_core/ast.rb', line 137 def filename @filename end |
#lineno ⇒ Object
Returns the value of attribute lineno
137 138 139 |
# File 'lib/hamdown_core/ast.rb', line 137 def lineno @lineno end |
#text ⇒ Object
Returns the value of attribute text
137 138 139 |
# File 'lib/hamdown_core/ast.rb', line 137 def text @text end |
Instance Method Details
#markdownable? ⇒ Boolean
149 150 151 |
# File 'lib/hamdown_core/ast.rb', line 149 def markdownable? true end |
#to_h ⇒ Object
145 146 147 |
# File 'lib/hamdown_core/ast.rb', line 145 def to_h super.merge(type: 'text') end |