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



73
74
75
# File 'lib/utopia/controller/respond.rb', line 73

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

#with_jsonObject



65
66
67
# File 'lib/utopia/controller/respond.rb', line 65

def with_json
	@handlers << Handlers::JSON
end

#with_passthroughObject



69
70
71
# File 'lib/utopia/controller/respond.rb', line 69

def with_passthrough
	@handlers << Handlers::Passthrough
end