Class: ArrayT

Inherits:
Any show all
Defined in:
lib/types/array_t.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Any

#t, #t=, #to_s

Constructor Details

#initialize(value) ⇒ ArrayT

Returns a new instance of ArrayT.



37
# File 'lib/types/array_t.rb', line 37

def initialize(value) = super(setup_value(value))

Class Method Details

.t(value) ⇒ Object

Raises:



8
9
10
11
12
# File 'lib/types/array_t.rb', line 8

def t(value)
  raise RubytTypeError.new(ArrayT, value.class) unless value.is_a? ArrayT

  value
end

Instance Method Details

#!=(other) ⇒ Object



43
44
45
# File 'lib/types/array_t.rb', line 43

def !=(other)
  !(other.is_a?(ArrayT) && other.t == @value)
end

#==(other) ⇒ Object



39
40
41
# File 'lib/types/array_t.rb', line 39

def ==(other)
  other.is_a?(ArrayT) && other.t == @value
end