Sha256: c75031f52df1ab80f2e12bdc7c3f32f227ba3e3c18bc560a9659222bf931d1ed

Contents?: true

Size: 775 Bytes

Versions: 7

Compression:

Stored size: 775 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
      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

7 entries across 7 versions & 1 rubygems

Version Path
ramaze-0.1.4 lib/ramaze/trinity.rb
ramaze-0.1.0 lib/ramaze/trinity.rb
ramaze-0.1.1 lib/ramaze/trinity.rb
ramaze-0.1.2 lib/ramaze/trinity.rb
ramaze-0.1.3 lib/ramaze/trinity.rb
ramaze-0.2.0 lib/ramaze/trinity.rb
ramaze-0.2.1 lib/ramaze/trinity.rb