Navigation Menu

Skip to content

Commit

Permalink
Docs for definitions and adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunemaker committed Sep 7, 2012
1 parent 65e4582 commit fe42a98
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/adapter.rb
Expand Up @@ -6,6 +6,7 @@ module Adapter
extend Asserts extend Asserts
include Defaults include Defaults


# Stores the definitions for each adapter by name
def self.definitions def self.definitions
@definitions ||= {} @definitions ||= {}
end end
Expand All @@ -20,6 +21,7 @@ def self.define(name, mod=nil, &block)
definitions[name.to_sym] = definition_module definitions[name.to_sym] = definition_module
end end


# Memoizes adapter instances based on their definitions
def self.adapters def self.adapters
@adapters ||= {} @adapters ||= {}
end end
Expand Down

0 comments on commit fe42a98

Please sign in to comment.