Class: Profiler__::Wrapper
- Inherits:
-
Struct
- Object
- Struct
- Profiler__::Wrapper
- Defined in:
- lib/profiler.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#defined_class ⇒ Object
readonly
Returns the value of attribute defined_class.
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#method_id ⇒ Object
readonly
Returns the value of attribute method_id.
Instance Method Summary collapse
-
#initialize(klass, mid) ⇒ Wrapper
constructor
A new instance of Wrapper.
- #to_s ⇒ Object (also: #inspect)
Constructor Details
#initialize(klass, mid) ⇒ Wrapper
Returns a new instance of Wrapper.
65 66 67 68 |
# File 'lib/profiler.rb', line 65 def initialize(klass, mid) super(klass, mid, nil) self.hash = Struct.instance_method(:hash).bind(self).call end |
Instance Attribute Details
#defined_class ⇒ Object
Returns the value of attribute defined_class
62 63 64 |
# File 'lib/profiler.rb', line 62 def defined_class @defined_class end |
#hash ⇒ Object
Returns the value of attribute hash
62 63 64 |
# File 'lib/profiler.rb', line 62 def hash @hash end |
#method_id ⇒ Object
Returns the value of attribute method_id
62 63 64 |
# File 'lib/profiler.rb', line 62 def method_id @method_id end |
Instance Method Details
#to_s ⇒ Object Also known as: inspect
70 71 72 |
# File 'lib/profiler.rb', line 70 def to_s "#{defined_class.inspect}#".sub(/\A\#<Class:(.*)>#\z/, '\1.') << method_id.to_s end |