Module: Usher::Interface

Defined in:
lib/usher/interface.rb,
lib/usher/interface/merb_interface.rb,
lib/usher/interface/rack_interface.rb,
lib/usher/interface/email_interface.rb,
lib/usher/interface/rails3_interface.rb,
lib/usher/interface/rails2_2_interface.rb,
lib/usher/interface/rails2_3_interface.rb,
lib/usher/interface/rack_interface/route.rb,
lib/usher/interface/rails2_2_interface/mapper.rb

Defined Under Namespace

Classes: EmailInterface, MerbInterface, RackInterface, Rails2_2Interface, Rails2_3Interface, Rails3Interface

Class Method Summary collapse

Class Method Details

.class_for(type) ⇒ Object


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/usher/interface.rb', line 14

def self.class_for(type)
  case type
  when :rails2_2
    Rails2_2Interface
  when :rails2_3
    Rails2_3Interface
  when :merb
    MerbInterface
  when :rack
    RackInterface
  when :email
    EmailInterface
  when :rails3
    Rails3Interface
  end
  
end

.for(type, &blk) ⇒ Object


10
11
12
# File 'lib/usher/interface.rb', line 10

def self.for(type, &blk)
  class_for(type).new(&blk)
end