Sha256: da027085d12f0c749a349c065acdc1a84d94122e619d146eb7b75c42338edd3e

Contents?: true

Size: 775 Bytes

Versions: 2

Compression:

Stored size: 775 Bytes

Contents

#          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
# All files in this distribution are subject to the terms of the Ruby license.

require 'ramaze/trinity/request'
require 'ramaze/trinity/response'
require 'ramaze/trinity/session'

module Ramaze

  # The module to be included into the Controller it basically just provides
  # #request, #response and #session, each accessing Thread.current to
  # retrieve the demanded object

  module Trinity
    private

    # same as
    #   Thread.current[:request]

    def request
      Request.current
    end

    # same as
    #   Thread.current[:response]

    def response
      Response.current
    end

    # same as
    #   Thread.current[:session]

    def session
      Session.current
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ramaze-0.3.5 lib/ramaze/trinity.rb
ramaze-0.3.0 lib/ramaze/trinity.rb