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.
8 9 10 11 |
# File 'lib/ipsummer/paragraph.rb', line 8 def initialize(={}) @paragraph_text = [:paragraph_text] @links = [:links] end |
Instance Attribute Details
#links ⇒ Object (readonly)
Returns the value of attribute links.
6 7 8 |
# File 'lib/ipsummer/paragraph.rb', line 6 def links @links end |
#paragraph_text ⇒ Object (readonly)
Returns the value of attribute paragraph_text.
6 7 8 |
# File 'lib/ipsummer/paragraph.rb', line 6 def paragraph_text @paragraph_text end |
Instance Method Details
#unwrapped_paragraph ⇒ Object
13 14 15 |
# File 'lib/ipsummer/paragraph.rb', line 13 def unwrapped_paragraph unescaped complete_paragraph end |
#wrapped_paragraph ⇒ Object
17 18 19 |
# File 'lib/ipsummer/paragraph.rb', line 17 def wrapped_paragraph unescaped "<p>#{complete_paragraph}</p>" end |