Class: Klipbook::Sources::KindleDevice::File
- Inherits:
-
Object
- Object
- Klipbook::Sources::KindleDevice::File
- Defined in:
- lib/klipbook/sources/kindle_device/file.rb
Instance Method Summary collapse
-
#books ⇒ Object
TODO Shift max books here.
-
#initialize(infile, max_books, file_parser = FileParser.new) ⇒ File
constructor
A new instance of File.
Constructor Details
#initialize(infile, max_books, file_parser = FileParser.new) ⇒ File
Returns a new instance of File.
5 6 7 8 9 |
# File 'lib/klipbook/sources/kindle_device/file.rb', line 5 def initialize(infile, max_books, file_parser=FileParser.new) @file_text = infile.strip @file_parser = file_parser @max_books = max_books end |
Instance Method Details
#books ⇒ Object
TODO Shift max books here
12 13 14 |
# File 'lib/klipbook/sources/kindle_device/file.rb', line 12 def books @books ||= build_books.take(@max_books) end |