Class: Coradoc::Element::TextElement
- Inherits:
-
Object
- Object
- Coradoc::Element::TextElement
- Defined in:
- lib/coradoc/element/text_element.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#line_break ⇒ Object
readonly
Returns the value of attribute line_break.
Instance Method Summary collapse
-
#initialize(content, options = {}) ⇒ TextElement
constructor
A new instance of TextElement.
- #to_adoc ⇒ Object
Constructor Details
#initialize(content, options = {}) ⇒ TextElement
Returns a new instance of TextElement.
5 6 7 8 9 |
# File 'lib/coradoc/element/text_element.rb', line 5 def initialize(content, = {}) @content = content#.to_s @id = .fetch(:id, nil) @line_break = .fetch(:line_break, "") end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
3 4 5 |
# File 'lib/coradoc/element/text_element.rb', line 3 def content @content end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/coradoc/element/text_element.rb', line 3 def id @id end |
#line_break ⇒ Object (readonly)
Returns the value of attribute line_break.
3 4 5 |
# File 'lib/coradoc/element/text_element.rb', line 3 def line_break @line_break end |