Class: Calibre::AbstractBook

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/calibre/book.rb

Overview

We do this to prevent AR to fail miserably because the foreign key name is the same as the class

Direct Known Subclasses

Book

Instance Method Summary collapse

Instance Method Details

#coverObject



12
13
14
# File 'lib/calibre/book.rb', line 12

def cover
  File.join(path, 'cover.jpg')
end

#cover?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/calibre/book.rb', line 16

def cover?
  has_cover == 1
end