Method: Masscan::Parsers::Binary.open

Defined in:
lib/masscan/parsers/binary.rb

.open(path) {|file| ... } ⇒ File

Opens a binary file for parsing.

Parameters:

  • path (String)

    The path to the file.

Yields:

  • (file)

    If a block is given, it will be passed the opened file. Once the block returns, the file will be closed.

Yield Parameters:

  • The (File)

    opened file.

Returns:

  • (File)

    If no block was given, the opened file will be returned.



34
35
36
# File 'lib/masscan/parsers/binary.rb', line 34

def self.open(path,&block)
  File.open(path,'rb',&block)
end