Class: Coradoc::Document::Paragraph
- Inherits:
-
Object
- Object
- Coradoc::Document::Paragraph
- Defined in:
- lib/coradoc/document/paragraph.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(content, _options = {}) ⇒ Paragraph
constructor
A new instance of Paragraph.
- #texts ⇒ Object
Constructor Details
#initialize(content, _options = {}) ⇒ Paragraph
Returns a new instance of Paragraph.
6 7 8 |
# File 'lib/coradoc/document/paragraph.rb', line 6 def initialize(content, = {}) @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/coradoc/document/paragraph.rb', line 4 def content @content end |
Instance Method Details
#id ⇒ Object
10 11 12 |
# File 'lib/coradoc/document/paragraph.rb', line 10 def id content&.first&.id&.to_s end |
#texts ⇒ Object
14 15 16 |
# File 'lib/coradoc/document/paragraph.rb', line 14 def texts content.map(&:content) end |