diff options
author | Tim Smith <tsmith84@gmail.com> | 2021-12-31 23:35:24 -0500 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2021-12-31 23:35:24 -0500 |
commit | 59a53cad26bbc179455ccef2e1a827986c519f81 (patch) | |
tree | 755014400eda060a3e785329550699c45197edd1 /tasks | |
parent | bb6116d12fbc75dbb3d1daa36b8413b1bc6638d1 (diff) | |
download | chef-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-x | tasks/docs.rb | 2 |
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 |