summaryrefslogtreecommitdiff
path: root/tasks/docs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tasks/docs.rb')
-rwxr-xr-xtasks/docs.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/tasks/docs.rb b/tasks/docs.rb
index b815988b8b..5d336a7b14 100755
--- a/tasks/docs.rb
+++ b/tasks/docs.rb
@@ -126,17 +126,14 @@ namespace :docs_site do
#
# Build the actions section of the resource yaml
+ # as a hash of actions to markdown descriptions.
#
# @return [Hash]
#
def action_list(actions)
- list = {}
- actions.sort.each do |action|
- # nothing is a special case that sources the content from the docs site
- list[action.to_sym] = (action == "nothing" ? { "shortcode" => "resources_common_actions_nothing.md" } : { "markdown" => nil })
- end
-
- list
+ actions = actions.map { |k, v| [k.to_sym, { "markdown" => v } ] }.to_h
+ actions[:nothing] = { "shortcode" => "resources_common_actions_nothing.md" }
+ actions
end
# TODO: