Sha256: 74bb61ca1fae02fd8bb47d271c25b1783a0dae99ec84a0440569c50cecffd29d

Contents?: true

Size: 540 Bytes

Versions: 13

Compression:

Stored size: 540 Bytes

Contents

module Kaya
  module Support
    class Request

      def initialize req
        @req = req
      end

      def path
        self.path_info
      end

      def path_info
        @req.env["PATH_INFO"]
      end

      def ip
        @req.env["REMOTE_ADDR"]
      end

      def method_missing(method_name, *args, &block)
        begin
          send("@req.#{method_name}", *args)
        rescue
          $K_LOG.error "#{method_name} not found for req in #{self.class}. Returning nil"
          nil
        end
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
kaya-0.0.13 lib/kaya/support/request.rb
kaya-0.0.12 lib/kaya/support/request.rb
kaya-0.0.11 lib/kaya/support/request.rb
kaya-0.0.10 lib/kaya/support/request.rb
kaya-0.0.9 lib/kaya/support/request.rb
kaya-0.0.8 lib/kaya/support/request.rb
kaya-0.0.7 lib/kaya/support/request.rb
kaya-0.0.6 lib/kaya/support/request.rb
kaya-0.0.5 lib/kaya/support/request.rb
kaya-0.0.4 lib/kaya/support/request.rb
kaya-0.0.3 lib/kaya/support/request.rb
kaya-0.0.2 lib/kaya/support/request.rb
kaya-0.0.1 lib/kaya/support/request.rb