Class: HashTML::Text
- Inherits:
-
Object
- Object
- HashTML::Text
- Defined in:
- lib/hashtml.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text) ⇒ Text
constructor
A new instance of Text.
- #to_h ⇒ Object
- #to_html ⇒ Object
Constructor Details
#initialize(text) ⇒ Text
Returns a new instance of Text.
186 187 188 |
# File 'lib/hashtml.rb', line 186 def initialize(text) @text = text end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
184 185 186 |
# File 'lib/hashtml.rb', line 184 def text @text end |
Instance Method Details
#to_h ⇒ Object
190 191 192 |
# File 'lib/hashtml.rb', line 190 def to_h { text: @text } end |
#to_html ⇒ Object
194 195 196 |
# File 'lib/hashtml.rb', line 194 def to_html @text end |