Class: Tarantool::Requests::Call

Inherits:
Tarantool::Request show all
Defined in:
lib/tarantool/requests/call.rb

Instance Attribute Summary collapse

Attributes inherited from Tarantool::Request

#args, #params, #space, #space_no

Instance Method Summary collapse

Methods inherited from Tarantool::Request

#connection, #initialize, #make_packet, #make_response, pack_field, pack_tuple, #perform, #request_id, request_type, #response_params

Constructor Details

This class inherits a constructor from Tarantool::Request

Instance Attribute Details

#flagsObject (readonly)

Returns the value of attribute flags.



6
7
8
# File 'lib/tarantool/requests/call.rb', line 6

def flags
  @flags
end

#proc_nameObject (readonly)

Returns the value of attribute proc_name.



6
7
8
# File 'lib/tarantool/requests/call.rb', line 6

def proc_name
  @proc_name
end

#tupleObject (readonly)

Returns the value of attribute tuple.



6
7
8
# File 'lib/tarantool/requests/call.rb', line 6

def tuple
  @tuple
end

Instance Method Details

#make_bodyObject



13
14
15
16
17
# File 'lib/tarantool/requests/call.rb', line 13

def make_body
  [flags].pack('L') +
  self.class.pack_field(proc_name) +
  self.class.pack_tuple(*tuple)
end

#parse_argsObject



7
8
9
10
11
# File 'lib/tarantool/requests/call.rb', line 7

def parse_args
  @flags = params[:return_tuple] ? 1 : 0
  @proc_name = params[:proc_name]
  @tuple = params[:args] || []
end