Method: BinStruct::Int#to_s

Defined in:
lib/bin_struct/int.rb

#to_s::String

This method is abstract.

Returns:

  • (::String)

Raises:

  • (Error)

    This is an abstract method and must be redefined



59
60
61
62
63
# File 'lib/bin_struct/int.rb', line 59

def to_s
  raise Error, 'BinStruct::Int#to_s is abstract' unless defined? @packstr

  [to_i].pack(@packstr[@endian])
end