class Epubber::Models::Chapter

Public Class Methods

new() click to toggle source
# File lib/epubber/models/chapter.rb, line 8
def initialize
  @id = 0
  @title = 'Not specified'
  @content = '<p>Not specified</p>'
end

Public Instance Methods

content(text) click to toggle source
# File lib/epubber/models/chapter.rb, line 22
def content(text)
  @content = clean_html(text)
end
contextify() click to toggle source
# File lib/epubber/models/chapter.rb, line 26
def contextify
  { 'id' => @id, 'title' => @title, 'content' => @content }
end
id(idx) click to toggle source
# File lib/epubber/models/chapter.rb, line 14
def id(idx)
  @id = idx
end
title(text) click to toggle source
# File lib/epubber/models/chapter.rb, line 18
def title(text)
  @title = text
end