Class: Profiler__::Wrapper

Inherits:
Struct
  • Object
show all
Defined in:
lib/profiler.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

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_classObject

Returns the value of attribute defined_class

Returns:

  • (Object)

    the current value of defined_class


61
62
63
# File 'lib/profiler.rb', line 61

def defined_class
  @defined_class
end

#hashObject

Returns the value of attribute hash

Returns:

  • (Object)

    the current value of hash


61
62
63
# File 'lib/profiler.rb', line 61

def hash
  @hash
end

#method_idObject

Returns the value of attribute method_id

Returns:

  • (Object)

    the current value of method_id


61
62
63
# File 'lib/profiler.rb', line 61

def method_id
  @method_id
end

Instance Method Details

#to_sObject 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