Class: ActiveRecord::Snapshot::Create

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/snapshot/actions/create.rb

Class Method Summary collapse

Instance Method Summary collapse

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

#callObject



15
16
17
# File 'lib/active_record/snapshot/actions/create.rb', line 15

def call
  Stepper.call(self, **steps)
end