Sha256: d9ba7030cfa4694f25936aacd6708d1f9812186e10562a3fc24ed866443c8c98

Contents?: true

Size: 528 Bytes

Versions: 4

Compression:

Stored size: 528 Bytes

Contents

# frozen_string_literal: true

module AR
  module Sequence
    module CommandRecorder
      # Usage:
      #
      #   create_sequence :user_position
      #
      def create_sequence(name, options = {})
        record(__method__, [name, options])
      end

      # Usage:
      #
      #   drop_sequence :user_position
      #
      def drop_sequence(name)
        record(__method__, [name])
      end

      def invert_create_sequence(args)
        name, _ = args
        [:drop_sequence, [name]]
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ar-sequence-0.2.1 lib/ar/sequence/command_recorder.rb
ar-sequence-0.2.0 lib/ar/sequence/command_recorder.rb
ar-sequence-0.1.2 lib/ar/sequence/command_recorder.rb
ar-sequence-0.1.1 lib/ar/sequence/command_recorder.rb