Class: KRPC::Types::ValueType

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(type_string) ⇒ ValueType

Returns a new instance of ValueType.

Raises:



143
144
145
146
# File 'lib/krpc/types.rb', line 143

def initialize(type_string)
  raise(ValueError, "\"#{type_string}\" is not a valid type string for a value type") unless PROTOBUF_TO_RUBY_VALUE_TYPE.has_key? type_string
  super(type_string, PROTOBUF_TO_RUBY_VALUE_TYPE[type_string])
end