Class: HS::Text
- Inherits:
-
Object
- Object
- HS::Text
- Includes:
- ElementPreview
- Defined in:
- lib/hs/elements/text.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(args) ⇒ Text
constructor
A new instance of Text.
- #preview ⇒ Object
Methods included from ElementPreview
#element_preview, #text_preview
Constructor Details
#initialize(args) ⇒ Text
Returns a new instance of Text.
11 12 13 14 15 |
# File 'lib/hs/elements/text.rb', line 11 def initialize(args) args.each do |key, val| instance_variable_set("@#{key}", val) end end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
9 10 11 |
# File 'lib/hs/elements/text.rb', line 9 def text @text end |
Instance Method Details
#preview ⇒ Object
17 18 19 |
# File 'lib/hs/elements/text.rb', line 17 def preview text_preview(text) end |