Class: Contrast::Agent::ModuleData

Inherits:
Object
  • Object
show all
Defined in:
lib/contrast/agent/module_data.rb

Overview

A simple wrapper around a Module and a call to its name, used to avoid calling the Module#name method and generating extra Strings

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mod, name = nil) ⇒ ModuleData

Returns a new instance of ModuleData.



11
12
13
14
# File 'lib/contrast/agent/module_data.rb', line 11

def initialize mod, name = nil
  @mod = mod
  @name = name || mod.cs__name
end

Instance Attribute Details

#modObject (readonly)

Returns the value of attribute mod.



9
10
11
# File 'lib/contrast/agent/module_data.rb', line 9

def mod
  @mod
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/contrast/agent/module_data.rb', line 9

def name
  @name
end