Class: TingYun::Agent::Transaction::Attributes

Inherits:
Object
  • Object
show all
Defined in:
lib/ting_yun/agent/transaction/attributes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAttributes

Returns a new instance of Attributes.



9
10
11
12
# File 'lib/ting_yun/agent/transaction/attributes.rb', line 9

def initialize
  @agent_attributes  = {}
  @request_params = {}
end

Instance Attribute Details

#agent_attributesObject

Returns the value of attribute agent_attributes.



8
9
10
# File 'lib/ting_yun/agent/transaction/attributes.rb', line 8

def agent_attributes
  @agent_attributes
end

#request_paramsObject

Returns the value of attribute request_params.



8
9
10
# File 'lib/ting_yun/agent/transaction/attributes.rb', line 8

def request_params
  @request_params
end

Instance Method Details

#add_agent_attribute(key, value) ⇒ Object



14
15
16
17
# File 'lib/ting_yun/agent/transaction/attributes.rb', line 14

def add_agent_attribute(key, value)
  return if value.nil?
  @agent_attributes[key] = value
end

#merge_request_parameters(hash) ⇒ Object



19
20
21
# File 'lib/ting_yun/agent/transaction/attributes.rb', line 19

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