summaryrefslogtreecommitdiff
path: root/lib/chef/resource/chocolatey_source.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/chocolatey_source.rb')
-rw-r--r--lib/chef/resource/chocolatey_source.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/chef/resource/chocolatey_source.rb b/lib/chef/resource/chocolatey_source.rb
index 9f57e0dbdc..f002d7d28b 100644
--- a/lib/chef/resource/chocolatey_source.rb
+++ b/lib/chef/resource/chocolatey_source.rb
@@ -1,5 +1,5 @@
#
-# Copyright:: 2018, Chef Software, Inc.
+# Copyright:: 2018-2019, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -21,6 +21,22 @@ class Chef
description "Use the chocolatey_source resource to add, remove, enable, or disable Chocolatey sources."
introduced "14.3"
+ examples <<~DOC
+ Add a Chocolatey source
+ ```ruby
+ chocolatey_source 'MySource' do
+ source 'http://example.com/something'
+ action :add
+ end
+ ```
+
+ Remove a Chocolatey source
+ ```ruby
+ chocolatey_source 'MySource' do
+ action :remove
+ end
+ ```
+ DOC
property :source_name, String, name_property: true,
description: "An optional property to set the source name if it differs from the resource block's name."