17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/table_structure/schema/class_methods.rb', line 17
def merge(*others)
others.each do |other|
raise ::TableStructure::Error, "Must be a schema class. [#{other}]" unless Utils.schema_class?(other)
end
schema_class = CompositeClass.new.compose(self, *others)
Schema.create_class do
@__column_definitions__ = schema_class.column_definitions
@__context_builders__ = schema_class.context_builders
@__column_builders__ = schema_class.column_builders
@__row_builders__ = schema_class.row_builders
end
end
|