Method: TableStructure::Schema::ClassMethods#+

Defined in:
lib/table_structure/schema/class_methods.rb

#+(other) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/table_structure/schema/class_methods.rb', line 6

def +(other)
  unless ::TableStructure::Schema::Utils.schema_class?(other)
    raise ::TableStructure::Error, "Must be a schema class. #{other}"
  end

  self_class = self

  ::TableStructure::Schema.create_class do
    columns self_class
    columns other
  end
end