Class: Contrast::Agent::ModuleData
- 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
-
#mod ⇒ Object
readonly
Returns the value of attribute mod.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(mod, name = nil) ⇒ ModuleData
constructor
A new instance of ModuleData.
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
#mod ⇒ Object (readonly)
Returns the value of attribute mod.
9 10 11 |
# File 'lib/contrast/agent/module_data.rb', line 9 def mod @mod end |