Skip to content

Commit

Permalink
Correct help text
Browse files Browse the repository at this point in the history
  • Loading branch information
mblumtritt committed May 30, 2024
1 parent d8bb5e7 commit 2e0dd11
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions lib/im-lost.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,26 +131,26 @@ def trace_results=(value)
#
# Print the call location conditionally.
#
# @example simply print location
# @example Print current location
# ImLost.here
#
# @example print location when instance variable is empty
# @example Print current location when instance variable is empty
# ImLost.here(@name.empty?)
#
# @example print location when instance variable is nil or empty
# @example Print current location when instance variable is nil or empty
# ImLost.here { @name.nil? || @name.empty? }
#
# @overload here
# Prints the caller location.
# Prints the call location.
# @return [true]
#
# @overload here(test)
# Prints the caller location when given argument is truthy.
# Prints the call location when given argument is truthy.
# @param test [Object]
# @return [Object] test
#
# @overload here
# Prints the caller location when given block returns a truthy result.
# Prints the call location when given block returns a truthy result.
# @yield When the block returns a truthy result the location will be print
# @yieldreturn [Object] return result
#
Expand All @@ -166,12 +166,12 @@ def here(test = true)
#
# The given arguments can be any object instance or module or class.
#
# @example trace method calls of an instance variable for a while
# @example Trace method calls of an instance variable for a while
# ImLost.trace(@file)
# # ...
# ImLost.untrace(@file)
#
# @example temporary trace method calls
# @example Temporary trace method calls
# File.open('test.txt', 'w') do |file|
# ImLost.trace(file) do
# file << 'hello '
Expand All @@ -191,7 +191,7 @@ def here(test = true)
#
# @overload trace(*args)
# @param args [[Object]] one or more objects to be traced
# @return [[Object]] the traced object(s)
# @return [Array<Object>] the traced object(s)
# Start tracing the given objects.
# @see untrace
# @see untrace_all!
Expand All @@ -212,16 +212,16 @@ def trace(*args, &block)
#
# Stop tracing objects.
#
# @example trace some objects for some code lines
# traced_vars = ImLost.trace(@file, @client)
# @example Trace some objects for some code lines
# traced_obj = ImLost.trace(@file, @client)
# # ...
# ImLost.untrace(*traced_vars)
# ImLost.untrace(*traced_obj)
#
# @see trace
#
# @param args [[Object]] one or more objects which should not longer be
# @param args [[]Object]] one or more objects which should not longer be
# traced
# @return [[Object]] the object(s) which are not longer be traced
# @return [Array<Object>] the object(s) which are not longer be traced
# @return [nil] when none of the objects was traced before
#
def untrace(*args)
Expand All @@ -230,9 +230,8 @@ def untrace(*args)
end

#
# Stop tracing any object.
# (When you are really lost and just like to stop tracing of all your
# objects.)
# Stop tracing any object. When you are really lost and just like to stop
# tracing of all your objects.
#
# @see trace
#
Expand Down Expand Up @@ -365,7 +364,7 @@ def _local_vars(binding)
# # the timer with name 'my_test' is not longer valid now
#
#
# @example Use an anonymous timer (identified by ID)
# @example Use an anonymous timer
# tmr = ImLost.timer.create
#
# # ...your code here...
Expand Down Expand Up @@ -440,7 +439,7 @@ def delete(*id_or_names)
end

#
# Print the ID or name and the runtime since timer was created.
# Print the ID or name and the runtime since a timer was created.
# It includes the location.
#
# @param id_or_name [Integer, #to_s] the identifier or the name of the timer
Expand Down

0 comments on commit 2e0dd11

Please sign in to comment.