mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
rubocop: fix offences of the Style/MethodDefParentheses cop
This commit is contained in:
parent
343832f4c7
commit
13f35137c0
3 changed files with 6 additions and 15 deletions
|
@ -274,15 +274,6 @@ Style/IfInsideElse:
|
|||
- 'lib/pry/slop/commands.rb'
|
||||
- 'lib/pry/slop/option.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
|
||||
Style/MethodDefParentheses:
|
||||
Exclude:
|
||||
- 'lib/pry/helpers/table.rb'
|
||||
- 'lib/pry/terminal.rb'
|
||||
|
||||
# Offense count: 7
|
||||
Style/MethodMissingSuper:
|
||||
Exclude:
|
||||
|
|
|
@ -41,7 +41,7 @@ class Pry
|
|||
rows_to_s.join("\n")
|
||||
end
|
||||
|
||||
def rows_to_s style = :color_on
|
||||
def rows_to_s(style = :color_on)
|
||||
widths = columns.map { |e| _max_width(e) }
|
||||
@rows_without_colors.map do |r|
|
||||
padded = []
|
||||
|
@ -56,19 +56,19 @@ class Pry
|
|||
end
|
||||
end
|
||||
|
||||
def items= items
|
||||
def items=(items)
|
||||
@items = items
|
||||
_rebuild_colorless_cache
|
||||
_recolumn
|
||||
items
|
||||
end
|
||||
|
||||
def column_count= n
|
||||
def column_count=(n)
|
||||
@column_count = n
|
||||
_recolumn
|
||||
end
|
||||
|
||||
def fits_on_line? line_length
|
||||
def fits_on_line?(line_length)
|
||||
_max_width(rows_to_s :no_color) <= line_length
|
||||
end
|
||||
|
||||
|
@ -107,7 +107,7 @@ class Pry
|
|||
end
|
||||
end
|
||||
|
||||
def _recall_color_for thing
|
||||
def _recall_color_for(thing)
|
||||
@colorless_cache[thing]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ class Pry
|
|||
end
|
||||
|
||||
# Return a screen size or a default if that fails.
|
||||
def size! default = [27, 80]
|
||||
def size!(default = [27, 80])
|
||||
screen_size || default
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue