Parent

Rcov::CallSiteAnalyzer::CallSite

Object representing a method call site. It corresponds to a part of the callstack starting from the context that called the method.

Public Instance Methods

calling_class(level = 0) click to toggle source

Name of the class holding the method where the call originated. Might return nil if it could not be determined.

    # File lib/rcov/call_site_analyzer.rb, line 85
85:       def calling_class(level = 0)
86:         stack_frame = backtrace[level]
87:         stack_frame ? stack_frame[0] : nil
88:       end
calling_method(level = 0) click to toggle source

Name of the method where the call originated. Returns nil if the call originated in toplevel. Might return nil if it could not be determined.

    # File lib/rcov/call_site_analyzer.rb, line 78
78:       def calling_method(level = 0)
79:         stack_frame = backtrace[level]
80:         stack_frame ? stack_frame[1] : nil
81:       end
depth() click to toggle source

whose information is included in the CallSite object.

    # File lib/rcov/call_site_analyzer.rb, line 57
57:       def depth
58:         backtrace.size
59:       end
file(level = 0) click to toggle source

File where the method call originated. Might return nil or “” if it is not meaningful (C extensions, etc).

    # File lib/rcov/call_site_analyzer.rb, line 63
63:       def file(level = 0)
64:         stack_frame = backtrace[level]
65:         stack_frame ? stack_frame[2] : nil
66:       end
line(level = 0) click to toggle source

Line where the method call originated. Might return nil or 0 if it is not meaningful (C extensions, etc).

    # File lib/rcov/call_site_analyzer.rb, line 70
70:       def line(level = 0)
71:         stack_frame = backtrace[level]
72:         stack_frame ? stack_frame[3] : nil
73:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.