Method: Fix::Protocol::Field#can_parse?

Defined in:
lib/fix/protocol/field.rb

#can_parse?(str) ⇒ Boolean

Checks whether the start of the given string can be parsed as this particular field

Parameters:

  • str (String)

    The string for which we want to parse the beginning

Returns:

  • (Boolean)

    Whether the beginning of the string can be parsed for this field



36
37
38
# File 'lib/fix/protocol/field.rb', line 36

def can_parse?(str)
  str.match(/^#{tag}\=[^\x01]+\x01/)
end