Class: Paragraph

Inherits:
Object
  • Object
show all
Defined in:
lib/ipsummer/paragraph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Paragraph

Returns a new instance of Paragraph.



7
8
9
10
# File 'lib/ipsummer/paragraph.rb', line 7

def initialize(options={})
  @paragraph_text = options[:paragraph_text]
  @links = options[:links]
end

Instance Attribute Details

Returns the value of attribute links.



5
6
7
# File 'lib/ipsummer/paragraph.rb', line 5

def links
  @links
end

#paragraph_textObject (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_paragraphObject



12
13
14
# File 'lib/ipsummer/paragraph.rb', line 12

def unwrapped_paragraph
  unescaped complete_paragraph
end

#wrapped_paragraphObject



16
17
18
# File 'lib/ipsummer/paragraph.rb', line 16

def wrapped_paragraph
  unescaped "<p>#{complete_paragraph}</p>"
end