Sha256: 88ceb986cbcad77b114248a6f4c17db8261ae8c4d691b24296cfa69ddc16f28b

Contents?: true

Size: 562 Bytes

Versions: 6

Compression:

Stored size: 562 Bytes

Contents

require "fx/command_recorder/arguments"
require "fx/command_recorder/function"
require "fx/command_recorder/trigger"

module Fx
  # @api private
  module CommandRecorder
    include Function
    include Trigger

    private

    def perform_inversion(method, args)
      arguments = Arguments.new(args)

      if arguments.revert_to_version.nil?
        message = "`#{method}` is reversible only if given a `revert_to_version`"
        raise ActiveRecord::IrreversibleMigration, message
      end

      [method, arguments.invert_version.to_a]
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
fx-0.8.0 lib/fx/command_recorder.rb
fx-0.7.0 lib/fx/command_recorder.rb
fx-jets-0.6.3s lib/fx/command_recorder.rb
fx-0.6.2 lib/fx/command_recorder.rb
fx-0.6.1 lib/fx/command_recorder.rb
fx-0.6.0 lib/fx/command_recorder.rb