summaryrefslogtreecommitdiff
path: root/lib/chef/shell
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/shell')
-rw-r--r--lib/chef/shell/ext.rb4
-rw-r--r--lib/chef/shell/shell_session.rb2
2 files changed, 3 insertions, 3 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
diff --git a/lib/chef/shell/shell_session.rb b/lib/chef/shell/shell_session.rb
index 0a8cba5be3..a458286157 100644
--- a/lib/chef/shell/shell_session.rb
+++ b/lib/chef/shell/shell_session.rb
@@ -126,7 +126,7 @@ module Shell
end
def shorten_node_inspect
- def @node.inspect
+ def @node.inspect # rubocop:disable Lint/NestedMethodDefinition
"<Chef::Node:0x#{self.object_id.to_s(16)} @name=\"#{self.name}\">"
end
end