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

Returns a new instance of ValueType.



87
88
89
# File 'lib/krpc/types.rb', line 87

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