Class: Epubber::Models::Introduction

Inherits:
Object
  • Object
show all
Includes:
Concerns::HasHTML
Defined in:
lib/epubber/models/introduction.rb

Instance Method Summary collapse

Methods included from Concerns::HasHTML

#clean_html

Constructor Details

#initializeIntroduction

Returns a new instance of Introduction.



8
9
10
# File 'lib/epubber/models/introduction.rb', line 8

def initialize
  @content = '<p>Not specified</p>'
end

Instance Method Details

#content(content) ⇒ Object



12
13
14
# File 'lib/epubber/models/introduction.rb', line 12

def content(content)
  @content = clean_html(content)
end

#contextifyObject



16
17
18
# File 'lib/epubber/models/introduction.rb', line 16

def contextify
  { 'content' => @content }
end