Sha256: e4e3d0be50826d7addcf3d9c66094da9752e0b70ab4ac9e58fb0a80d82efb566

Contents?: true

Size: 694 Bytes

Versions: 1

Compression:

Stored size: 694 Bytes

Contents

module Timber
  module Contexts
    module HTTPRequests
      class Rack < HTTPRequest
        class Params < DynamicValues
          attr_reader :params

          def initialize(params)
            # Initialize should be as fast as possible since it is executed inline.
            # Hence the lazy methods below.
            @params = params
            super()
          end

          private
            # Override values_array so that this is done in the background thread
            def values_array
              @values_array ||= params.collect do |key, value|
                {:name => key, :value => value}
              end
            end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
timberio-1.0.0.beta1 lib/timber/contexts/http_requests/rack/params.rb