Sha256: 638dfe3451e09a0c4d283e2dd6f0dc753a64c0e3b61e0dba121a84807c4ab0d0

Contents?: true

Size: 399 Bytes

Versions: 14

Compression:

Stored size: 399 Bytes

Contents

module Kaya
  module Support
    class QueryString

      attr_reader :values, :req

      # req = Request
      def initialize req
        @req = req
        @values = Rack::Utils.parse_nested_query(req.query_string.split("/").last)
      end

      def value_for key
        @values[key]
      end

      def method_missing(key, *args, &block)
        @values[key.to_s]
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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