Method: IO#binread
- Defined in:
- lib/clearbooks/core_ext/io_binary_read.rb
#binread(file, *args) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/clearbooks/core_ext/io_binary_read.rb', line 10 def binread(file, *args) fail ArgumentError, "wrong number of arguments (#{1 + args.size} for 1..3)" unless args.size < 3 File.open(file, "rb") do |f| f.read(*args) end end |