mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
rubocop: fix offences of the Layout/AccessModifierIndentation cop
This commit is contained in:
parent
d202713f1c
commit
7b3421cad5
5 changed files with 13 additions and 15 deletions
|
@ -13,17 +13,6 @@ Gemspec/RequiredRubyVersion:
|
|||
Exclude:
|
||||
- 'pry.gemspec'
|
||||
|
||||
# Offense count: 5
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
||||
# SupportedStyles: outdent, indent
|
||||
Layout/AccessModifierIndentation:
|
||||
Exclude:
|
||||
- 'lib/pry/commands/change_inspector.rb'
|
||||
- 'lib/pry/commands/gem_search.rb'
|
||||
- 'lib/pry/commands/list_inspectors.rb'
|
||||
- 'spec/method_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
Layout/AlignArray:
|
||||
|
|
|
@ -19,7 +19,8 @@ class Pry::Command::ChangeInspector < Pry::ClassCommand
|
|||
end
|
||||
end
|
||||
|
||||
private
|
||||
private
|
||||
|
||||
def inspector_map
|
||||
Pry::Inspector::MAP
|
||||
end
|
||||
|
|
|
@ -29,7 +29,8 @@ class Pry::Command::GemSearch < Pry::ClassCommand
|
|||
_pry_.pager.page list_as_string(gems, opts[:limit])
|
||||
end
|
||||
|
||||
private
|
||||
private
|
||||
|
||||
def list_as_string(gems, limit = 10)
|
||||
gems[0..limit - 1].map do |gem|
|
||||
name, version, info = gem.values_at 'name', 'version', 'info'
|
||||
|
|
|
@ -19,7 +19,8 @@ class Pry::Command::ListInspectors < Pry::ClassCommand
|
|||
end
|
||||
end
|
||||
|
||||
private
|
||||
private
|
||||
|
||||
def inspector_map
|
||||
Pry::Inspector::MAP
|
||||
end
|
||||
|
|
|
@ -260,7 +260,13 @@ describe Pry::Method do
|
|||
end
|
||||
|
||||
it 'should be able to find private and protected instance methods defined in a class' do
|
||||
@class = Class.new { protected; def prot; 1; end; private; def priv; 1; end }
|
||||
@class = Class.new do
|
||||
protected
|
||||
def prot; 1; end
|
||||
|
||||
private
|
||||
def priv; 1; end
|
||||
end
|
||||
should_find_method('priv')
|
||||
should_find_method('prot')
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue