class Peeek::Calls
Public Instance Methods
at(line)
click to toggle source
Filter the calls by line number.
@param [Number, Range<Number>] line line number or range of lines @return [Peeek::Calls] filtered calls
# File lib/peeek/calls.rb, line 16 def at(line) Calls.new(select { |call| line === call.line }) end
exceptions()
click to toggle source
Filter only the calls that an exception raised.
@return [Peeek::Calls] filtered calls
# File lib/peeek/calls.rb, line 38 def exceptions Calls.new(select(&:raised?)) end
from(receiver)
click to toggle source
Filter the calls by a receiver.
@param [Module, Class, Object] receiver @return [Peeek::Calls] filtered calls
# File lib/peeek/calls.rb, line 24 def from(receiver) Calls.new(select { |call| call.receiver == receiver }) end
in(file)
click to toggle source
Filter the calls by name of a file.
@param [String, Regexp] file name or pattern of a file @return [Peeek::Calls] filtered calls
# File lib/peeek/calls.rb, line 8 def in(file) Calls.new(select { |call| file === call.file }) end
return_values()
click to toggle source
Filter only the calls that a value returned.
@return [Peeek::Calls] filtered calls
# File lib/peeek/calls.rb, line 31 def return_values Calls.new(select(&:returned?)) end