Sha256: 49f3ff6bdb03b15c0268084adf69bebdf9683db406e35962832bd3096d309187

Contents?: true

Size: 1.04 KB

Versions: 14

Compression:

Stored size: 1.04 KB

Contents

module Statesman
  autoload :Config,     'statesman/config'
  autoload :Machine,    'statesman/machine'
  autoload :Callback,   'statesman/callback'
  autoload :Guard,      'statesman/guard'
  autoload :Version,    'statesman/version'
  module Adapters
    autoload :Memory,       "statesman/adapters/memory"
    autoload :ActiveRecord, "statesman/adapters/active_record"
    autoload :ActiveRecordTransition,
             "statesman/adapters/active_record_transition"
    autoload :ActiveRecordQueries,
             "statesman/adapters/active_record_queries"
    autoload :Mongoid,      "statesman/adapters/mongoid"
    autoload :MongoidTransition,
             "statesman/adapters/mongoid_transition"
  end
  require 'statesman/railtie' if defined?(::Rails::Railtie)

  # Example:
  #   Statesman.configure do
  #     storage_adapter Statesman::ActiveRecordAdapter
  #   end
  #
  def self.configure(&block)
    config = Config.new(block)
    @storage_adapter = config.adapter_class
  end

  def self.storage_adapter
    @storage_adapter || Adapters::Memory
  end
end

Version data entries

14 entries across 13 versions & 2 rubygems

Version Path
statesman-3.0.0 lib/statesman.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/statesman-2.0.1/lib/statesman.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/statesman-1.3.1/lib/statesman.rb
statesman-2.0.1 lib/statesman.rb
statesman-2.0.0 lib/statesman.rb
statesman-2.0.0.rc1 lib/statesman.rb
statesman-1.3.1 lib/statesman.rb
statesman-1.3.0 lib/statesman.rb
statesman-1.2.5 lib/statesman.rb
statesman-1.2.4 lib/statesman.rb
statesman-1.2.3 lib/statesman.rb
statesman-1.2.2 lib/statesman.rb
statesman-1.2.1 lib/statesman.rb
statesman-1.2.0 lib/statesman.rb