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.



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

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

Instance Attribute Details

Returns the value of attribute links.



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

def links
  @links
end

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



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

def unwrapped_paragraph
  unescaped complete_paragraph
end

#wrapped_paragraphObject



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

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