Class: Respondie::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/respondie/builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(pattern, controller) ⇒ Builder

Returns a new instance of Builder.



3
4
5
6
7
8
# File 'lib/respondie/builder.rb', line 3

def initialize(pattern, controller)
  @pattern = pattern
  custom = Class.new(ActionController::Responder)
  controller.responder = custom
  @responder = controller.responder
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym) ⇒ Object



10
11
12
# File 'lib/respondie/builder.rb', line 10

def method_missing(sym)
  trait sym
end