Class: Contrast::Agent::Assess::Events::EventData

Inherits:
Object
  • Object
show all
Defined in:
lib/contrast/agent/assess/events/event_data.rb

Overview

this class will gather and build event.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(policy_node, tagged, object, ret, args) ⇒ EventData

Group event data together

Parameters:

  • policy_node (Contrast::Agent::Assess::Policy::PolicyNode, nil)

    the node that governs this event

  • tagged (Object, nil)

    the Target to which this event pertains

  • object (Object, nil)

    the Object on which the method was invoked

  • ret (Object, nil)

    the Return of the invoked method

  • args (Array<Object>, nil)

    the Arguments with which the method was invoked



28
29
30
31
32
33
34
# File 'lib/contrast/agent/assess/events/event_data.rb', line 28

def initialize policy_node, tagged, object, ret, args
  @policy_node = policy_node
  @tagged = tagged
  @object = object
  @ret = ret
  @args = args
end

Instance Attribute Details

#argsArray<Object>? (readonly)

Returns the Arguments with which the method was invoked.

Returns:

  • (Array<Object>, nil)

    the Arguments with which the method was invoked.



19
20
21
# File 'lib/contrast/agent/assess/events/event_data.rb', line 19

def args
  @args
end

#objectObject? (readonly)

Returns the Object on which the method was invoked.

Returns:

  • (Object, nil)

    the Object on which the method was invoked.



15
16
17
# File 'lib/contrast/agent/assess/events/event_data.rb', line 15

def object
  @object
end

#policy_nodeContrast::Agent::Assess::Policy::PolicyNode? (readonly)

Returns the node that governs this event.

Returns:



11
12
13
# File 'lib/contrast/agent/assess/events/event_data.rb', line 11

def policy_node
  @policy_node
end

#retObject? (readonly)

Returns the Return of the invoked method.

Returns:

  • (Object, nil)

    the Return of the invoked method.



17
18
19
# File 'lib/contrast/agent/assess/events/event_data.rb', line 17

def ret
  @ret
end

#taggedObject? (readonly)

Returns the Target to which this event pertains.

Returns:

  • (Object, nil)

    the Target to which this event pertains.



13
14
15
# File 'lib/contrast/agent/assess/events/event_data.rb', line 13

def tagged
  @tagged
end