Class: MTP::Response

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

Instance Attribute Summary collapse

Attributes inherited from ParametersContainer

#parameters

Attributes inherited from Container

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

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

Instance Attribute Details

#dataObject

Returns the value of attribute data.



106
107
108
# File 'lib/mtp/container.rb', line 106

def data
  @data
end

Instance Method Details

#one_of?(*names) ⇒ Boolean

Returns:

  • (Boolean)


107
108
109
# File 'lib/mtp/container.rb', line 107

def one_of?(*names)
  names.include?(code.name)
end

#typeObject



111
112
113
# File 'lib/mtp/container.rb', line 111

def type
  3
end