Class: Epub::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/epub-reader/page.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, path, file) ⇒ Page

Returns a new instance of Page.



3
4
5
6
7
# File 'lib/epub-reader/page.rb', line 3

def initialize(title, path, file)
  @title = title
  @path  = path
  @file  = file
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/epub-reader/page.rb', line 9

def path
  @path
end

#titleObject (readonly)

Returns the value of attribute title.



9
10
11
# File 'lib/epub-reader/page.rb', line 9

def title
  @title
end

Instance Method Details

#contentObject



11
12
13
# File 'lib/epub-reader/page.rb', line 11

def content
  @content ||= get_page_content
end