Class: T::Types::TypedArray::Untyped

Inherits:
TypedArray
  • Object
show all
Defined in:
lib/types/types/typed_array.rb

Defined Under Namespace

Modules: Private

Instance Method Summary collapse

Constructor Details

#initializeUntyped

Returns a new instance of Untyped.



55
56
57
# File 'lib/types/types/typed_array.rb', line 55

def initialize
  super(T::Types::Untyped::Private::INSTANCE)
end

Instance Method Details

#freezeObject



63
64
65
66
# File 'lib/types/types/typed_array.rb', line 63

def freeze
  build_type # force lazy initialization before freezing the object
  super
end

#valid?(obj) ⇒ Boolean

Returns:



59
60
61
# File 'lib/types/types/typed_array.rb', line 59

def valid?(obj)
  obj.is_a?(Array)
end