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
13
# File 'lib/ting_yun/agent/transaction/attributes.rb', line 9

def initialize
  @agent_attributes  = {:httpStatus => 0} #defaul value
  @request_params = {}
  @custom_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

#custom_paramsObject

Returns the value of attribute custom_params.



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

def custom_params
  @custom_params
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

no longer to care about the value if nil or not



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

def add_agent_attribute(key, value)
  @agent_attributes[key] = value
end

#add_custom_params(key, value) ⇒ Object



24
25
26
# File 'lib/ting_yun/agent/transaction/attributes.rb', line 24

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

#merge_request_parameters(hash) ⇒ Object



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

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