Class: Rambo::Controller

Inherits:
Object
  • Object
show all
Includes:
Cache, Params, Redirect, Template
Defined in:
lib/rambo/controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Redirect

#redirect

Methods included from Params

#indifferent_hash, #params

Methods included from Cache

#fresh?

Methods included from Template

#erb, #haml

Instance Attribute Details

#requestObject

Returns the value of attribute request.



8
9
10
# File 'lib/rambo/controller.rb', line 8

def request
  @request
end

#responseObject

Returns the value of attribute response.



8
9
10
# File 'lib/rambo/controller.rb', line 8

def response
  @response
end

Instance Method Details

#actionObject



23
24
25
# File 'lib/rambo/controller.rb', line 23

def action
  self.request.action
end

#already_rendered?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/rambo/controller.rb', line 15

def already_rendered?
  @rendered
end

#controllerObject



19
20
21
# File 'lib/rambo/controller.rb', line 19

def controller
  self.request.controller
end

#hostObject



31
32
33
# File 'lib/rambo/controller.rb', line 31

def host
  self.request.env['HTTP_HOST']
end

#sessionObject



27
28
29
# File 'lib/rambo/controller.rb', line 27

def session
  request.env['rack.session'] ||= {}
end