Skip to content

Commit

Permalink
Remove dangling documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
paracycle committed Dec 10, 2021
1 parent 244562a commit de1168c
Showing 1 changed file with 0 additions and 60 deletions.
60 changes: 0 additions & 60 deletions lib/memo_wise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -472,64 +472,4 @@ def reset_memo_wise(method_name = nil, *args, **kwargs)

mod.tap { const_set(:MemoWiseMethods, mod) }
end

##
# @!method self.preset_memo_wise(method_name, *args, **kwargs)
# Implementation of {#preset_memo_wise} for class methods.
#
# @example
# class Example
# extend MemoWise
#
# def self.method_called_times
# @method_called_times
# end
#
# def self.method_to_preset
# @method_called_times = (@method_called_times || 0) + 1
# "A"
# end
# memo_wise self: :method_to_preset
# end
#
# Example.preset_memo_wise(:method_to_preset) { "B" }
#
# Example.method_to_preset #=> "B"
#
# Example.method_called_times #=> nil
##

##
# @!method self.reset_memo_wise(method_name = nil, *args, **kwargs)
# Implementation of {#reset_memo_wise} for class methods.
#
# @example
# class Example
# extend MemoWise
#
# def self.method_to_reset(x)
# @method_called_times = (@method_called_times || 0) + 1
# end
# memo_wise self: :method_to_reset
# end
#
# Example.method_to_reset("a") #=> 1
# Example.method_to_reset("a") #=> 1
# Example.method_to_reset("b") #=> 2
# Example.method_to_reset("b") #=> 2
#
# Example.reset_memo_wise(:method_to_reset, "a") # reset "method + args" mode
#
# Example.method_to_reset("a") #=> 3
# Example.method_to_reset("a") #=> 3
# Example.method_to_reset("b") #=> 2
# Example.method_to_reset("b") #=> 2
#
# Example.reset_memo_wise(:method_to_reset) # reset "method" (any args) mode
#
# Example.method_to_reset("a") #=> 4
# Example.method_to_reset("b") #=> 5
#
# Example.reset_memo_wise # reset "all methods" mode
##
end

0 comments on commit de1168c

Please sign in to comment.