summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-12-31 23:35:24 -0500
committerTim Smith <tsmith84@gmail.com>2021-12-31 23:35:24 -0500
commit59a53cad26bbc179455ccef2e1a827986c519f81 (patch)
tree755014400eda060a3e785329550699c45197edd1 /tasks
parentbb6116d12fbc75dbb3d1daa36b8413b1bc6638d1 (diff)
downloadchef-59a53cad26bbc179455ccef2e1a827986c519f81.tar.gz
Resolve Style/MapToHash chefstyle warningStyle_MapToHash
Simplify how we create a hash Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'tasks')
-rwxr-xr-xtasks/docs.rb2
1 files changed, 1 insertions, 1 deletions
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