--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "A CallSiteAnalyzer can be used to obtain information about:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: where a method is defined (&quot;<tt>defsite</tt>&quot;)
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: where a method was called from (&quot;<tt>callsite</tt>&quot;)
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Example
- !ruby/struct:SM::Flow::P 
  body: "<tt>example.rb</tt>:"
- !ruby/struct:SM::Flow::VERB 
  body: " class X\n   def f1; f2 end\n   def f2; 1 + 1 end\n   def f3; f1 end\n end\n\n analyzer = Rcov::CallSiteAnalyzer.new\n x = X.new\n analyzer.run_hooked do\n   x.f1\n end\n # ....\n\n analyzer.run_hooked do\n   x.f3\n   # the information generated in this run is aggregated\n   # to the previously recorded one\n end\n\n analyzer.analyzed_classes        # =&gt; [&quot;X&quot;, ... ]\n analyzer.methods_for_class(&quot;X&quot;)  # =&gt; [&quot;f1&quot;, &quot;f2&quot;, &quot;f3&quot;]\n analyzer.defsite(&quot;X#f1&quot;)         # =&gt; DefSite object\n analyzer.callsites(&quot;X#f2&quot;)       # =&gt; hash with CallSite =&gt; count\n                                  #    associations\n defsite = analyzer.defsite(&quot;X#f1&quot;)\n defsite.file                     # =&gt; &quot;example.rb&quot;\n defsite.line                     # =&gt; 2\n"
- !ruby/struct:SM::Flow::P 
  body: "You can have several CallSiteAnalyzer objects at a time, and it is possible to nest the #run_hooked / #install_hook/#remove_hook blocks: each analyzer will manage its data separately. Note however that no special provision is taken to ignore code executed &quot;inside&quot; the CallSiteAnalyzer class."
- !ruby/struct:SM::Flow::P 
  body: <tt>defsite</tt> information is only available for methods that were called under the inspection of the CallSiteAnalyzer, i.o.w. you will only have <tt>defsite</tt> information for those methods for which callsite information is available.
constants: []

full_name: Rcov::CallSiteAnalyzer
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: analyzed_classes
- !ruby/object:RI::MethodSummary 
  name: analyzed_methods
- !ruby/object:RI::MethodSummary 
  name: callsites
- !ruby/object:RI::MethodSummary 
  name: defsite
- !ruby/object:RI::MethodSummary 
  name: methods_for_class
name: CallSiteAnalyzer
superclass: DifferentialAnalyzer
