Class: Klipbook::Sources::Source
- Inherits:
-
Object
- Object
- Klipbook::Sources::Source
- Defined in:
- lib/klipbook/sources/source.rb
Class Method Summary collapse
Class Method Details
.build(options) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/klipbook/sources/source.rb', line 4 def self.build() if .from_file file_source(.from_file, .count) else raise "Unknown source type" end end |
.file_source(file, max_books) ⇒ Object
12 13 14 |
# File 'lib/klipbook/sources/source.rb', line 12 def self.file_source(file, max_books) Sources::KindleDevice::File.new(File.read(file), max_books) end |