Class: MTP::Request

Inherits:
ParametersContainer show all
Defined in:
lib/mtp/container.rb

Instance Attribute Summary

Attributes inherited from ParametersContainer

#parameters

Attributes inherited from Container

#code, #length, #length_read, #payload, #transaction_id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ParametersContainer

#initialize, #pack_payload, #payload=

Methods inherited from Container

#pack, #pack_header, #pack_payload, parse, #to_s

Constructor Details

This class inherits a constructor from MTP::ParametersContainer

Class Method Details

.for(code, *parameters) ⇒ Object



70
71
72
73
74
75
# File 'lib/mtp/container.rb', line 70

def self.for(code, *parameters)
  request = Request.new
  request.code = code
  request.parameters = parameters
  request
end

Instance Method Details

#typeObject



77
78
79
# File 'lib/mtp/container.rb', line 77

def type
  1
end