Class: ActiveRecord::SchemaDumper

Inherits:
Object
  • Object
show all
Defined in:
lib/gems/activerecord-2.2.2/lib/active_record/schema_dumper.rb

Overview

This class is used to dump the database schema for some connection to some output format (i.e., ActiveRecord::Schema).

Constant Summary collapse

@@ignore_tables =
[]

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.dump(connection = ActiveRecord::Base.connection, stream = STDOUT) ⇒ Object



16
17
18
19
# File 'lib/gems/activerecord-2.2.2/lib/active_record/schema_dumper.rb', line 16

def self.dump(connection=ActiveRecord::Base.connection, stream=STDOUT)
  new(connection).dump(stream)
  stream
end

Instance Method Details

#dump(stream) ⇒ Object



21
22
23
24
25
26
# File 'lib/gems/activerecord-2.2.2/lib/active_record/schema_dumper.rb', line 21

def dump(stream)
  header(stream)
  tables(stream)
  trailer(stream)
  stream
end