Class: Paragraph
- Inherits:
-
Object
- Object
- Paragraph
- Defined in:
- lib/ipsummer/paragraph.rb
Instance Attribute Summary collapse
-
#links ⇒ Object
readonly
Returns the value of attribute links.
-
#paragraph_text ⇒ Object
readonly
Returns the value of attribute paragraph_text.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Paragraph
constructor
A new instance of Paragraph.
- #unwrapped_paragraph ⇒ Object
- #wrapped_paragraph ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Paragraph
Returns a new instance of Paragraph.
7 8 9 10 |
# File 'lib/ipsummer/paragraph.rb', line 7 def initialize(={}) @paragraph_text = [:paragraph_text] @links = [:links] end |
Instance Attribute Details
#links ⇒ Object (readonly)
Returns the value of attribute links.
5 6 7 |
# File 'lib/ipsummer/paragraph.rb', line 5 def links @links end |
#paragraph_text ⇒ Object (readonly)
Returns the value of attribute paragraph_text.
5 6 7 |
# File 'lib/ipsummer/paragraph.rb', line 5 def paragraph_text @paragraph_text end |
Instance Method Details
#unwrapped_paragraph ⇒ Object
12 13 14 |
# File 'lib/ipsummer/paragraph.rb', line 12 def unwrapped_paragraph unescaped complete_paragraph end |
#wrapped_paragraph ⇒ Object
16 17 18 |
# File 'lib/ipsummer/paragraph.rb', line 16 def wrapped_paragraph unescaped "<p>#{complete_paragraph}</p>" end |