Sha256: 2f6d1294335a194626f89edbfa62ba1f911562b0fbeea7d431e488571a54f75e

Contents?: true

Size: 479 Bytes

Versions: 1

Compression:

Stored size: 479 Bytes

Contents

module Multiflow
  module Persistence
    module None
      extend ActiveSupport::Concern

      module ClassMethods
        def add_scope(machine, state)
          # do nothing
        end
      end

      def load_from_persistence(machine)
        instance_variable_get :"@state_#{machine.state_column}"
      end

      def save_to_persistence(machine, new_state, options)
        instance_variable_set :"@state_#{machine.state_column}", new_state
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
multiflow-1.0.0 lib/multiflow/persistence/none.rb