Class: ActiveRecord::Snapshot::Create
- Inherits:
-
Object
- Object
- ActiveRecord::Snapshot::Create
- Defined in:
- lib/active_record/snapshot/actions/create.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(name: nil) ⇒ Create
constructor
A new instance of Create.
Constructor Details
#initialize(name: nil) ⇒ Create
Returns a new instance of Create.
10 11 12 13 |
# File 'lib/active_record/snapshot/actions/create.rb', line 10 def initialize(name: nil) @named_snapshot = !name.nil? @snapshot = Snapshot.new(name) end |
Class Method Details
.call(*args) ⇒ Object
6 7 8 |
# File 'lib/active_record/snapshot/actions/create.rb', line 6 def self.call(*args) new(*args).call end |
Instance Method Details
#call ⇒ Object
15 16 17 |
# File 'lib/active_record/snapshot/actions/create.rb', line 15 def call Stepper.call(self, **steps) end |