Class: ElementFactory::Elements::TextElement
- Inherits:
-
Object
- Object
- ElementFactory::Elements::TextElement
- Defined in:
- lib/element_factory/elements/text_element.rb
Instance Attribute Summary collapse
-
#string ⇒ Object
Returns the value of attribute string.
Instance Method Summary collapse
-
#initialize(string) ⇒ TextElement
constructor
A new instance of TextElement.
- #to_html ⇒ Object
Constructor Details
#initialize(string) ⇒ TextElement
Returns a new instance of TextElement.
6 7 8 |
# File 'lib/element_factory/elements/text_element.rb', line 6 def initialize(string) @string = string end |
Instance Attribute Details
#string ⇒ Object
Returns the value of attribute string.
4 5 6 |
# File 'lib/element_factory/elements/text_element.rb', line 4 def string @string end |
Instance Method Details
#to_html ⇒ Object
10 11 12 |
# File 'lib/element_factory/elements/text_element.rb', line 10 def to_html ERB::Util.h(string) end |