Class: Unschema::Base
- Inherits:
-
Struct
- Object
- Struct
- Unschema::Base
- Defined in:
- lib/unschema/base.rb
Instance Attribute Summary collapse
-
#migrations_path ⇒ Object
Returns the value of attribute migrations_path.
-
#schema_file ⇒ Object
Returns the value of attribute schema_file.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#migrations_path ⇒ Object
Returns the value of attribute migrations_path
2 3 4 |
# File 'lib/unschema/base.rb', line 2 def migrations_path @migrations_path end |
#schema_file ⇒ Object
Returns the value of attribute schema_file
2 3 4 |
# File 'lib/unschema/base.rb', line 2 def schema_file @schema_file end |
#verbose ⇒ Object
Returns the value of attribute verbose
2 3 4 |
# File 'lib/unschema/base.rb', line 2 def verbose @verbose end |
Class Method Details
.process!(*args) ⇒ Object
3 4 5 |
# File 'lib/unschema/base.rb', line 3 def self.process!(*args) new(*args).process end |
Instance Method Details
#process ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/unschema/base.rb', line 11 def process load schema_file preset_version calls_for_tables = collect_calls(intermediator.calls) log "Found #{calls_for_tables.size} tables" calls_for_tables.sort.each do |table_name, calls| log " Dumping #{table_name.inspect}" dump_table_calls table_name, calls end log "Done" end |
#verbose? ⇒ Boolean
7 8 9 |
# File 'lib/unschema/base.rb', line 7 def verbose? !!verbose end |