1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Fixed comments indentation and line width

This commit is contained in:
bronzdoc 2016-02-11 12:47:02 -06:00
parent 4e8c02a2e2
commit 8902a27dcf

View file

@ -56,7 +56,7 @@ class Pry
alias << push alias << push
# Clear this session's history. This won't affect the contents of the # Clear this session's history. This won't affect the contents of the
# history file. # history file.
def clear def clear
@clearer.call @clearer.call
@original_lines = 0 @original_lines = 0
@ -81,16 +81,18 @@ class Pry
end end
# Filter the history with the histignore options # Filter the history with the histignore options
# @return [Array<String>] An array containing all the lines that are not included # @return [Array<String>] An array containing all the lines that are not
# in the histignore. # included in the histignore.
def filter(history) def filter(history)
history.select { |l| l unless should_ignore?(l) } history.select { |l| l unless should_ignore?(l) }
end end
private private
# Check if the line match any option in the histignore [Pry.config.history.histignore] # Check if the line match any option in the histignore
# @return [Boolean] a boolean that notifies if the line was found in the histignore array. # [Pry.config.history.histignore]
# @return [Boolean] a boolean that notifies if the line was found in the
# histignore array.
def should_ignore?(line) def should_ignore?(line)
hist_ignore = Pry.config.history.histignore hist_ignore = Pry.config.history.histignore
return false if hist_ignore.nil? || hist_ignore.empty? return false if hist_ignore.nil? || hist_ignore.empty?