Class: Scheming::Type::Tuple

Inherits:
Base
  • Object
show all
Defined in:
lib/scheming/type.rb

Overview

Tuple Type Definition

Specifies a type which specifies specific types in a fixed order. Another way to think of it is like an [Scheming::Type::Object] but without named attribute fields.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(types) ⇒ Tuple

Returns a new instance of Tuple.

Parameters:



56
57
58
59
60
# File 'lib/scheming/type.rb', line 56

def initialize(types)
  super()
  @types = types
  freeze
end

Instance Attribute Details

#typesArray<Scheming::Type::Base> (readonly)



53
54
55
# File 'lib/scheming/type.rb', line 53

def types
  @types
end