diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-09 12:50:27 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-16 18:41:25 -0700 |
commit | d0f4283fe47cbbe251eb34fee8657901374ff336 (patch) | |
tree | 55589ec4e6e9c425aec18850944209ecd79923fa /lib/chef/shell/ext.rb | |
parent | 7037433634d0b02574d03a8465541ea2f49d3f39 (diff) | |
download | chef-d0f4283fe47cbbe251eb34fee8657901374ff336.tar.gz |
"fix" Lint/NestedMethodDefinition cops
these are all awful, but fixing them will be time consuming. by disabling
them on the existing offenses we can enable the cop to prevent more of this
creeping into the codebase.
Diffstat (limited to 'lib/chef/shell/ext.rb')
-rw-r--r-- | lib/chef/shell/ext.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/shell/ext.rb b/lib/chef/shell/ext.rb index 40d7e10d2e..eab1d13e4d 100644 --- a/lib/chef/shell/ext.rb +++ b/lib/chef/shell/ext.rb @@ -39,13 +39,13 @@ module Shell # irb breaks if you prematurely define IRB::JobMangager # so these methods need to be defined at the latest possible time. unless jobs.respond_to?(:select_session_by_context) - def jobs.select_session_by_context(&block) + def jobs.select_session_by_context(&block) # rubocop:disable Lint/NestedMethodDefinition @jobs.select { |job| block.call(job[1].context.main) } end end unless jobs.respond_to?(:session_select) - def jobs.select_shell_session(target_context) + def jobs.select_shell_session(target_context) # rubocop:disable Lint/NestedMethodDefinition session = if target_context.kind_of?(Class) select_session_by_context { |main| main.kind_of?(target_context) } else |