Sha256: d4967585df79401fd2acea6f1458180ef4dba09fbeccbbbf56b2109157064536

Contents?: true

Size: 802 Bytes

Versions: 4

Compression:

Stored size: 802 Bytes

Contents

#          Copyright (c) 2006 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
      Thread.current[:request]
    end

    # same as
    #   Thread.current[:response]

    def response
      Thread.current[:response]
    end

    # same as
    #   Thread.current[:session]

    def session
      Thread.current[:session]
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ramaze-0.0.7 lib/ramaze/trinity.rb
ramaze-0.0.6 lib/ramaze/trinity.rb
ramaze-0.0.8 lib/ramaze/trinity.rb
ramaze-0.0.9 lib/ramaze/trinity.rb