Class: ActiveRecord::Snapshot::Import
- Inherits:
-
Object
- Object
- ActiveRecord::Snapshot::Import
- Defined in:
- lib/active_record/snapshot/actions/import.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(version: nil, tables: [], reset: false) ⇒ Import
constructor
A new instance of Import.
Constructor Details
#initialize(version: nil, tables: [], reset: false) ⇒ Import
Returns a new instance of Import.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/active_record/snapshot/actions/import.rb', line 8 def initialize(version: nil, tables: [], reset: false) @version = version if named_version? name = version else @version, name = SelectSnapshot.call(version) end @snapshot = Snapshot.new(name) @tables = tables @reset = reset end |
Class Method Details
.call(**args) ⇒ Object
4 5 6 |
# File 'lib/active_record/snapshot/actions/import.rb', line 4 def self.call(**args) new(**args).call end |
Instance Method Details
#call ⇒ Object
20 21 22 |
# File 'lib/active_record/snapshot/actions/import.rb', line 20 def call Stepper.call(self, **steps) end |