Sha256: 6630a5a163be7462f4941c2fa6016ac3bf6a6af1e79354b2dfe27eafdfe7f82c

Contents?: true

Size: 686 Bytes

Versions: 11

Compression:

Stored size: 686 Bytes

Contents

module Stateflow
  module Persistence
    def self.set(base)
      case Stateflow.persistence
        when :mongo_mapper
          Stateflow::Persistence::MongoMapper.install(base)
        when :active_record
          Stateflow::Persistence::ActiveRecord.install(base)
        when :mongoid
          Stateflow::Persistence::Mongoid.install(base)
        when :none
          Stateflow::Persistence::None.install(base)
      end
    end
    
    autoload :MongoMapper, 'stateflow/persistence/mongo_mapper'
    autoload :ActiveRecord, 'stateflow/persistence/active_record'
    autoload :Mongoid, 'stateflow/persistence/mongoid'
    autoload :None, 'stateflow/persistence/none'
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
stateflow-0.4.2 lib/stateflow/persistence.rb
stateflow-0.4.1 lib/stateflow/persistence.rb
stateflow-0.4.0 lib/stateflow/persistence.rb
stateflow-0.3.0 lib/stateflow/persistence.rb
stateflow-0.2.3 lib/stateflow/persistence.rb
stateflow-0.2.2 lib/stateflow/persistence.rb
stateflow-0.2.1 lib/stateflow/persistence.rb
stateflow-0.2.0 lib/stateflow/persistence.rb
stateflow-0.1.2 lib/stateflow/persistence.rb
stateflow-0.1.1 lib/stateflow/persistence.rb
stateflow-0.1.0 lib/stateflow/persistence.rb