Module: Creed::Responder

Defined in:
lib/creed/responder.rb

Instance Method Summary collapse

Instance Method Details

#initialize(controller, resources, options = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/creed/responder.rb', line 4

def initialize(controller, resources, options = {})
  super

  # If @resource is a Creed Command class, call #perform on it.
  @resource = @resource.perform if @resource.is_a?(Class) && @resource < Creed::Command
end