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.
64 65 66 67 |
# File 'lib/profiler.rb', line 64 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
61 62 63 |
# File 'lib/profiler.rb', line 61 def defined_class @defined_class end |
#hash ⇒ Object
Returns the value of attribute hash
61 62 63 |
# File 'lib/profiler.rb', line 61 def hash @hash end |
#method_id ⇒ Object
Returns the value of attribute method_id
61 62 63 |
# File 'lib/profiler.rb', line 61 def method_id @method_id end |
Instance Method Details
#to_s ⇒ Object Also known as: inspect
69 70 71 |
# File 'lib/profiler.rb', line 69 def to_s "#{defined_class.inspect}#".sub(/\A\#<Class:(.*)>#\z/, '\1.') << method_id.to_s end |