Class: KRPC::Types::ListType
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) ⇒ ListType
constructor
A new instance of ListType.
Constructor Details
#initialize(type_string) ⇒ ListType
Returns a new instance of ListType.
186 187 188 189 190 191 |
# File 'lib/krpc/types.rb', line 186 def initialize(type_string) m = /^List\((.+)\)$/.match type_string raise(ValueError, "\"#{type_string}\" is not a valid type string for a list type") unless m @value_type = TypeStore[m[1]] super(type_string, Array) end |
Instance Attribute Details
#value_type ⇒ Object (readonly)
Returns the value of attribute value_type.
185 186 187 |
# File 'lib/krpc/types.rb', line 185 def value_type @value_type end |