lib/ury_rapid/baps/responses/parser.rb
# Parses a word with a primitive type
#
# A primitive type is one which is implemented in BapsReader, and only
# requires one buffer read.  Other types are implemented in terms of
# special parser logic on these types, by the Parser itself.
#
# @api private
#
# @param parameter [Array] The argument's parameter name, its type
#   symbol, and any other arguments to the primitive type function.
#
# @return [Object] The argument if it was successfully read, or nil
#   otherwise.  An unsuccessful read implies that the read should be
#   retried when the reader's buffer fills up.
Parses a word with a primitive type
A primitive type is one which is implemented in BapsReader, and only
requires one buffer read.  Other types are implemented in terms of
special parser logic on these types, by the Parser itself.
Parses a word with a primitive type A primitive type is one which is implemented in BapsReader and only requires one buffer read . Other types are implemented in terms of special parser logic on these types by the Parser itself .
def primitive(parameter)
          name, arg_type, *args = parameter
          @reader.public_send(arg_type, *args) do |value|
            @response[name] = value
            word
          end
        end
def primitive ( parameter ) name , arg_type , * args = parameter @reader . public_send ( arg_type , * args ) do | value | @response [ name ] = value word end end
Parses a word with a primitive type
A primitive type is one which is implemented in BapsReader, and only
requires one buffer read.
Parses a word with a primitive type A primitive type is one which is implemented in BapsReader and only requires one buffer read .
The argument if it was successfully read, or nil otherwise. An unsuccessful read implies that the read should be retried when the reader's buffer fills up.
The argument if it was successfully read or nil otherwise . An unsuccessful read implies that the read should be retried when the reader ' s buffer fills up .
Object
parameter
The argument's parameter name, its type symbol, and any other arguments to the primitive type function.
The argument ' s parameter name its type symbol and any other arguments to the primitive type function .
api
None