Class: Utopia::Controller::Respond::Responder

Inherits:
Responder
  • Object
show all
Defined in:
lib/utopia/controller/respond.rb

Instance Attribute Summary

Attributes inherited from Responder

#handlers

Instance Method Summary collapse

Methods inherited from Responder

#call, #freeze, #handle, #initialize, #respond_to

Constructor Details

This class inherits a constructor from Utopia::Responder

Instance Method Details

#with(content_type, &block) ⇒ Object



56
57
58
# File 'lib/utopia/controller/respond.rb', line 56

def with(content_type, &block)
	handle(content_type, &block)
end

#with_jsonObject



48
49
50
# File 'lib/utopia/controller/respond.rb', line 48

def with_json
	@handlers << Handlers::JSON
end

#with_passthroughObject



52
53
54
# File 'lib/utopia/controller/respond.rb', line 52

def with_passthrough
	@handlers << Handlers::Passthrough
end