PATH:
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
TracePoint
U:RDoc::AnyMethod[iI"defined_class:ETI"TracePoint#defined_class;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"<Returns the class or module of the method being called.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I" class C; def foo; end; end ;TI"+trace = TracePoint.new(:call) do |tp| ;TI" p tp.defined_class #=> C ;TI"end.enable do ;TI" C.new.foo ;TI" end ;T:@format0o; ; [I"HIf the method is defined by a module, then that module is returned.;T@o;; [I"!module M; def foo; end; end ;TI"class C; include M; end ;TI"+trace = TracePoint.new(:call) do |tp| ;TI" p tp.defined_class #=> M ;TI"end.enable do ;TI" C.new.foo ;TI" end ;T; 0o; ; [I"=<b>Note:</b> #defined_class returns the singleton class.;T@o; ; [I"PThe 6th block parameter of Kernel#set_trace_func passes the original class ;TI"%attached by the singleton class.;T@o; ; [I"N<b>This is a difference between Kernel#set_trace_func and TracePoint.</b>;T@o;; [I"%class C; def self.foo; end; end ;TI"+trace = TracePoint.new(:call) do |tp| ;TI") p tp.defined_class #=> #<Class:C> ;TI"end.enable do ;TI" C.foo ;TI"end;T; 0: @fileI"trace_point.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@5FI"TracePoint;TcRDoc::NormalClass00
[-] disable-i.ri
[edit]
[-] raised_exception-i.ri
[edit]
[-] allow_reentry-c.ri
[edit]
[-] self-i.ri
[edit]
[-] event-i.ri
[edit]
[-] lineno-i.ri
[edit]
[-] new-c.ri
[edit]
[-] method_id-i.ri
[edit]
[-] cdesc-TracePoint.ri
[edit]
[-] instruction_sequence-i.ri
[edit]
[-] trace-c.ri
[edit]
[-] defined_class-i.ri
[edit]
[-] path-i.ri
[edit]
[-] enabled%3f-i.ri
[edit]
[-] callee_id-i.ri
[edit]
[+]
..
[-] enable-i.ri
[edit]
[-] return_value-i.ri
[edit]
[-] inspect-i.ri
[edit]
[-] binding-i.ri
[edit]
[-] eval_script-i.ri
[edit]
[-] parameters-i.ri
[edit]
[-] stat-c.ri
[edit]