Sha256: 808ad48cae77692d1802a678c50087f92353f80e1b743cc6b0f6a5652167b875

Contents?: true

Size: 621 Bytes

Versions: 12

Compression:

Stored size: 621 Bytes

Contents

# frozen_string_literal: true

require "delegate"
require "forwardable"

require "pakyow/support/indifferentize"

require "pakyow/connection/query_parser"

module Pakyow
  class Connection
    class Params < DelegateClass(Support::IndifferentHash)
      extend Forwardable
      def_delegators :@parser, :parse, :add, :add_value_for_key

      def initialize
        params = Support::IndifferentHash.new
        @parser = QueryParser.new(params: params)
        super(params)
      end

      # Fixes an issue using pp inside a delegator.
      #
      def pp(*args)
        Kernel.pp(*args)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pakyow-core-1.0.6 lib/pakyow/connection/params.rb
pakyow-core-1.0.5 lib/pakyow/connection/params.rb
pakyow-core-1.0.4 lib/pakyow/connection/params.rb
pakyow-core-1.0.3 lib/pakyow/connection/params.rb
pakyow-core-1.0.2 lib/pakyow/connection/params.rb
pakyow-core-1.0.1 lib/pakyow/connection/params.rb
pakyow-core-1.0.0 lib/pakyow/connection/params.rb
pakyow-core-1.0.0.rc5 lib/pakyow/connection/params.rb
pakyow-core-1.0.0.rc4 lib/pakyow/connection/params.rb
pakyow-core-1.0.0.rc3 lib/pakyow/connection/params.rb
pakyow-core-1.0.0.rc2 lib/pakyow/connection/params.rb
pakyow-core-1.0.0.rc1 lib/pakyow/connection/params.rb