Class: KRPC::Types::SetType

Inherits:
TypeBase 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(type_string) ⇒ SetType

Returns a new instance of SetType.

Raises:



212
213
214
215
216
217
# File 'lib/krpc/types.rb', line 212

def initialize(type_string)
  m = /^Set\((.+)\)$/.match type_string
  raise(ValueError, "\"#{type_string}\" is not a valid type string for a set type") unless m
  @value_type = TypeStore[m[1]]
  super(type_string, Set)
end

Instance Attribute Details

#value_typeObject (readonly)

Returns the value of attribute value_type.



211
212
213
# File 'lib/krpc/types.rb', line 211

def value_type
  @value_type
end