From 59a53cad26bbc179455ccef2e1a827986c519f81 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 31 Dec 2021 23:35:24 -0500 Subject: Resolve Style/MapToHash chefstyle warning Simplify how we create a hash Signed-off-by: Tim Smith --- tasks/docs.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/docs.rb b/tasks/docs.rb index 2fd92cc40e..a7743ff219 100755 --- a/tasks/docs.rb +++ b/tasks/docs.rb @@ -133,7 +133,7 @@ namespace :docs_site do # @return [Hash] # def action_list(actions, default_action) - actions = actions.map { |k, v| [k.to_sym, { "markdown" => k == default_action.first ? "#{v} (default)" : v } ] }.to_h + actions = actions.to_h { |k, v| [k.to_sym, { "markdown" => k == default_action.first ? "#{v} (default)" : v } ] } actions[:nothing] = { "shortcode" => "resources_common_actions_nothing.md" } actions end -- cgit v1.2.1