Class: Rack::MongoidAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/mongoid_adapter.rb,
lib/rack/mongoid_adapter/version.rb,
lib/rack/mongoid_adapter/controllers/base.rb,
lib/rack/mongoid_adapter/controllers/show_controller.rb,
lib/rack/mongoid_adapter/controllers/index_controller.rb,
lib/rack/mongoid_adapter/controllers/create_controller.rb,
lib/rack/mongoid_adapter/controllers/update_controller.rb,
lib/rack/mongoid_adapter/controllers/destroy_controller.rb,
lib/rack/mongoid_adapter/controllers/single_resource_controller.rb

Defined Under Namespace

Modules: Controllers

Constant Summary collapse

DEFAULT_MONGOID_CONFIGURATION_PATH =
"config/mongoid.yml"
VERSION =
"0.0.3"

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app = nil) ⇒ MongoidAdapter

Returns a new instance of MongoidAdapter.


35
36
37
# File 'lib/rack/mongoid_adapter.rb', line 35

def initialize(app = nil)
  @app = app
end

Class Method Details

.call(env) ⇒ Object


19
20
21
22
# File 'lib/rack/mongoid_adapter.rb', line 19

def call(env)
  configure_mongoid_unless_configured
  instance.call(env)
end

Instance Method Details

#call(env) ⇒ Object


39
40
41
# File 'lib/rack/mongoid_adapter.rb', line 39

def call(env)
  router.call(env)
end