Method: Finitio::StructType#initialize

Defined in:
lib/finitio/type/struct_type.rb

#initialize(component_types, name = nil, metadata = nil) ⇒ StructType

Returns a new instance of StructType.



34
35
36
37
38
39
40
41
42
# File 'lib/finitio/type/struct_type.rb', line 34

def initialize(component_types, name = nil,  = nil)
  unless component_types.is_a?(Array) &&
         component_types.all?{|c| c.is_a?(Type) }
    raise ArgumentError, "[Finitio::Type] expected, got `#{component_types}`"
  end

  super(name, )
  @component_types = component_types
end