Class: Glark::BinaryFile
Instance Attribute Summary
Attributes inherited from File
Instance Method Summary collapse
-
#initialize(fname) ⇒ BinaryFile
constructor
A new instance of BinaryFile.
- #search_as_binary(expr, output_opts) ⇒ Object
Methods inherited from File
#each_line, #get_line, #get_lines, #get_range_end, #get_range_start, #get_region, #linecount, #search
Constructor Details
#initialize(fname) ⇒ BinaryFile
Returns a new instance of BinaryFile.
8 9 10 11 12 |
# File 'lib/glark/io/file/binary_file.rb', line 8 def initialize fname file = ::File.new fname file.binmode # for MSDOS/WinWhatever super fname, file, nil end |
Instance Method Details
#search_as_binary(expr, output_opts) ⇒ Object
14 15 16 17 |
# File 'lib/glark/io/file/binary_file.rb', line 14 def search_as_binary expr, output_opts output_type = BinaryFileSummary.new self, output_opts search expr, output_type end |