lib/epub/parser.rb in epub-parser-io-0.1.6b vs lib/epub/parser.rb in epub-parser-io-0.1.6
- old
+ new
@@ -37,16 +37,16 @@
def parse(filepath, options = {})
new(filepath, options).parse
end
def parse_io(io_stream, options = {})
- new(io_stream, options.merge(io: true)).parse_io
+ new(io_stream, options.merge(io: true)).parse
end
end
def initialize(datasource, options = {})
if options[:io]
- raise "IO source not readable" unless datasource.respond_to?(:to_s)
+ raise "IO source not readable" unless datasource.respond_to?(:read)
@io_stream = datasource
@book = create_book options
file = Tempfile.new('epub_string')
file.write(@io_stream)