class DbSchema::Definitions::Field::Array

Public Class Methods

new(name, **options) click to toggle source
Calls superclass method
# File lib/db_schema/definitions/field/array.rb, line 7
def initialize(name, **options)
  type_class = Field.type_class_for(options[:element_type])
  super(name, **options.merge(element_type: type_class))
end

Public Instance Methods

array?() click to toggle source
# File lib/db_schema/definitions/field/array.rb, line 16
def array?
  true
end
attributes() click to toggle source
Calls superclass method
# File lib/db_schema/definitions/field/array.rb, line 12
def attributes
  super.merge(element_type: element_type.type)
end
custom_element_type?() click to toggle source
# File lib/db_schema/definitions/field/array.rb, line 24
def custom_element_type?
  element_type.superclass == Custom
end
element_type() click to toggle source
# File lib/db_schema/definitions/field/array.rb, line 20
def element_type
  @attributes[:element_type]
end