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

@ -81,16 +81,18 @@ class Pry
end
# Filter the history with the histignore options
# @return [Array<String>] An array containing all the lines that are not included
# in the histignore.
# @return [Array<String>] An array containing all the lines that are not
# included in the histignore.
def filter(history)
history.select { |l| l unless should_ignore?(l) }
end
private
# Check if the line match any option in the histignore [Pry.config.history.histignore]
# @return [Boolean] a boolean that notifies if the line was found in the histignore array.
# Check if the line match any option in the histignore
# [Pry.config.history.histignore]
# @return [Boolean] a boolean that notifies if the line was found in the
# histignore array.
def should_ignore?(line)
hist_ignore = Pry.config.history.histignore
return false if hist_ignore.nil? || hist_ignore.empty?