Module: Ribbit::Adapters

Defined in:
lib/ribbit/adapters.rb,
lib/ribbit/adapters/merb.rb,
lib/ribbit/adapters/none.rb,
lib/ribbit/adapters/adapter.rb

Defined Under Namespace

Classes: Adapter, Merb, None

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.adaptersObject

Returns the value of attribute adapters.



5
6
7
# File 'lib/ribbit/adapters.rb', line 5

def adapters
  @adapters
end

Class Method Details

.add_adapter(adapter) ⇒ Object

Register a new adapter - you do not need to call this directly if subclassing Adapter



12
13
14
# File 'lib/ribbit/adapters.rb', line 12

def add_adapter(adapter)
  self.adapters << adapter
end

.load_adapter(name) ⇒ Object



16
17
18
19
20
# File 'lib/ribbit/adapters.rb', line 16

def load_adapter(name)
  require_adapter!(name)
  adapter_class_name = name.to_s.capitalize
  Ribbit::Adapters.const_get(adapter_class_name) rescue nil
end