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: []) ⇒ Import
constructor
A new instance of Import.
Constructor Details
#initialize(version: nil, tables: []) ⇒ Import
Returns a new instance of Import.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/active_record/snapshot/actions/import.rb', line 8 def initialize(version: nil, tables: []) @version = version if named_version? name = version else @version, name = SelectSnapshot.call(version) end @snapshot = Snapshot.new(name) @tables = tables 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 |