lib/fix/protocol/field.rb
#
# Parses the value for this field from the beginning of the string passed as parameter
# and return the rest of the string. The field value is assigned to the +@value+ instance variable
#
# @param str [String] A string starting with the field to parse
# @return [String] The same string with the field stripped off
#
Parses the value for this field from the beginning of the string passed as parameter
and return the rest of the string. The field value is assigned to the +@value+ instance variable
Parses the value for this field from the beginning of the string passed as parameter and return the rest of the string . The field value is assigned to the + @value + instance variable
def parse(str)
        if str.match(/^#{tag}\=([^\x01]+)\x01/)
          @value = $1
          str.gsub(/^[^\x01]+\x01/, '')
        else
          str
        end
      end
def parse ( str ) if str . match ( / ^ #{ tag } \= ([^ \x01 ]+) \x01 / ) @value = $1 str . gsub ( / ^[^ \x01 ]+ \x01 / , '' ) else str end end
Parses the value for this field from the beginning of the string passed as parameter
and return the rest of the string.
Parses the value for this field from the beginning of the string passed as parameter and return the rest of the string .
The same string with the field stripped off
The same string with the field stripped off
String
str
A string starting with the field to parse
A string starting with the field to parse