Class: KRPC::Types::MessageType

Inherits:
TypeBase
  • Object
show all
Defined in:
lib/krpc/types.rb

Instance Attribute Summary

Attributes inherited from TypeBase

#protobuf_type, #ruby_type

Instance Method Summary collapse

Constructor Details

#initialize(pb_type) ⇒ MessageType

Returns a new instance of MessageType.



146
147
148
# File 'lib/krpc/types.rb', line 146

def initialize(pb_type)
  super(pb_type, PROTOBUF_TO_RUBY_MESSAGE_TYPES[pb_type.code] || raise(ValueError, "\"#{pb_type.code}\" is not a valid type code for a message type"))
end