Class: KRPC::Types::DictionaryType

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

Instance Attribute Summary collapse

Attributes inherited from TypeBase

#protobuf_type, #ruby_type

Instance Method Summary collapse

Constructor Details

#initialize(pb_type) ⇒ DictionaryType

Returns a new instance of DictionaryType.



139
140
141
142
# File 'lib/krpc/types.rb', line 139

def initialize(pb_type)
  @key_type, @value_type = pb_type.types.map {|t| TypeStore[t] }
  super(pb_type, Hash)
end

Instance Attribute Details

#key_typeObject (readonly)

Returns the value of attribute key_type.



138
139
140
# File 'lib/krpc/types.rb', line 138

def key_type
  @key_type
end

#value_typeObject (readonly)

Returns the value of attribute value_type.



138
139
140
# File 'lib/krpc/types.rb', line 138

def value_type
  @value_type
end