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.



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_classObject

Returns the value of attribute defined_class

Returns:

  • (Object)

    the current value of defined_class



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

def defined_class
  @defined_class
end

#hashObject

Returns the value of attribute hash

Returns:

  • (Object)

    the current value of hash



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

def hash
  @hash
end

#method_idObject

Returns the value of attribute method_id

Returns:

  • (Object)

    the current value of method_id



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

def method_id
  @method_id
end

Instance Method Details

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