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