Skip to content

Commit

Permalink
Resolve Style/MapToHash chefstyle warning
Browse files Browse the repository at this point in the history
Simplify how we create a hash

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 committed Jan 1, 2022
1 parent bb6116d commit 59a53ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/docs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def friendly_default_value(property)
# @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
Expand Down

0 comments on commit 59a53ca

Please sign in to comment.