lib/iso8583/message.rb
# Parse the bytes `str` returning a message of the defined type.
#
# returns an instance of Message
#
# will raise an ISO8583Exception if the bitmap definition can't be found
Parse the bytes `str` returning a message of the defined type.
returns an instance of Message

will raise an ISO8583Exception if the bitmap definition can't be found
Parse the bytes ` str ` returning a message of the defined type . returns an instance of Message will raise an ISO8583Exception if the bitmap definition can ' t be found
def parse(str)
        str = str.force_encoding('ASCII-8BIT')
        message = self.new
        message.mti, rest = _mti_format.parse(str)
        bmp,rest = Bitmap.parse(rest)
        bmp.each {|bit|
          bmp_def      = message._get_definition(bit)
          value, rest  = bmp_def.field.parse(rest)
          message[bit] = value
        }
        message
      end
def parse ( str ) str = str . force_encoding ( 'ASCII-8BIT' ) message = self . new message . mti , rest = _mti_format . parse ( str ) bmp , rest = Bitmap . parse ( rest ) bmp . each { | bit | bmp_def = message . _get_definition ( bit ) value , rest = bmp_def . field . parse ( rest ) message [ bit ] = value } message end
Parse the bytes `str` returning a message of the defined type.
Parse the bytes ` str ` returning a message of the defined type .
str
<not_specific>