Sha256: 890351e82346d951455b17436cbfe36c9a88a7b3199da09b541ed7c751e90521

Contents?: true

Size: 708 Bytes

Versions: 6

Compression:

Stored size: 708 Bytes

Contents

# encoding: utf-8

module TingYun
  module Agent
    class Transaction
      class Attributes

        attr_accessor :agent_attributes, :request_params, :custom_params
        def initialize
          @agent_attributes  = {:httpStatus => 0} #defaul value
          @request_params = {}
          @custom_params = {}
        end

        # no longer to care about the value if nil or not
        def add_agent_attribute(key, value)
          @agent_attributes[key] = value
        end

        def merge_request_parameters(hash)
          @request_params.merge!(hash) if hash
        end

        def add_custom_params(key, value)
          @custom_params[key] = value
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tingyun_rpm-1.6.1 lib/ting_yun/agent/transaction/attributes.rb
tingyun_rpm-1.5.0 lib/ting_yun/agent/transaction/attributes.rb
tingyun_rpm-1.4.2 lib/ting_yun/agent/transaction/attributes.rb
tingyun_rpm-1.4.1 lib/ting_yun/agent/transaction/attributes.rb
tingyun_rpm-1.3.1 lib/ting_yun/agent/transaction/attributes.rb
tingyun_rpm-1.3.0 lib/ting_yun/agent/transaction/attributes.rb