end
end
- # Method to initialize a SFF object along with
+ # Method to initialize an SFF object along with
# instance variables pertaining to the SFF header
# section.
def initialize(io)
@io.read(eight_byte_padding) unless eight_byte_padding == 8
end
- # Method to parse a read section of a SFF file.
+ # Method to parse a read section of an SFF file.
def read_parse
return nil if @number_of_reads == @@count
read
end
- # Method to check the magic number of a SFF file.
+ # Method to check the magic number of an SFF file.
# Raises an error if the magic number don't match.
def check_magic_number
raise SFFError, "Badly formatted SFF file." unless @magic_number == 779314790
end
- # Method to check the version number of a SFF file.
+ # Method to check the version number of an SFF file.
# Raises an error if the version don't match.
def check_version
- raise SFFError, "Wrong version #{@version}" unless @version.to_i == 1
+ raise SFFError, "Wrong version: #{@version}" unless @version.to_i == 1
end
- # Method to check the header length of a SFF file.
+ # Method to check the header length of an SFF file.
# Raises an error if the header length don't match
# the file position after reading the header section.
def check_header_length
private
- # Method that extracts the X/Y coordinates from a
- # SFF read name encoded with base36.
+ # Method that extracts the X/Y coordinates from
+ # an SFF read name encoded with base36.
def coordinates_get
base36 = self.name[-5, 5]
num = Base36.decode(base36)