Class: KRPC::Types::MessageType
Instance Attribute Summary
Attributes inherited from TypeBase
Instance Method Summary collapse
-
#initialize(type_string) ⇒ MessageType
constructor
A new instance of MessageType.
Constructor Details
#initialize(type_string) ⇒ MessageType
Returns a new instance of MessageType.
150 151 152 153 154 155 156 |
# File 'lib/krpc/types.rb', line 150 def initialize(type_string) if PROTOBUF_TO_MESSAGE_TYPE.has_key? type_string super(type_string, PROTOBUF_TO_MESSAGE_TYPE[type_string]) else raise(ValueError, "\"#{type_string}\" is not a valid type string for a message type") end end |