Class: KRPC::Types::SetType
Instance Attribute Summary collapse
-
#value_type ⇒ Object
readonly
Returns the value of attribute value_type.
Attributes inherited from TypeBase
Instance Method Summary collapse
-
#initialize(type_string) ⇒ SetType
constructor
A new instance of SetType.
Constructor Details
#initialize(type_string) ⇒ SetType
Returns a new instance of SetType.
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_type ⇒ Object (readonly)
Returns the value of attribute value_type.
211 212 213 |
# File 'lib/krpc/types.rb', line 211 def value_type @value_type end |