summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-04-10 18:59:23 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-04-12 16:12:07 -0700
commitd8dfb1f143ba3e602bec387508c8dad7aab00062 (patch)
treedf866900444f28dd1a85c0491c744c59bbc2fc92 /lib/puppet
parentdc2675df2805d1e2dbf3c50a49152bcfd78f922f (diff)
downloadpuppet-d8dfb1f143ba3e602bec387508c8dad7aab00062.tar.gz
puppet-d8dfb1f143ba3e602bec387508c8dad7aab00062.tar.xz
puppet-d8dfb1f143ba3e602bec387508c8dad7aab00062.zip
(#6962) Implement 'summary' for faces.
This adds the methods to the summary builder and runtime instance to support setting and getting a summary of the face. This is a short description used to summarize the purpose of the face in help output. For example, from the help face: "Displays help about puppet subcommands" Reviewed-By: Matt Robinson <matt@puppetlabs.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/interface.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/puppet/interface.rb b/lib/puppet/interface.rb
index 07e27efa8..27b3584b9 100644
--- a/lib/puppet/interface.rb
+++ b/lib/puppet/interface.rb
@@ -68,8 +68,13 @@ class Puppet::Interface
self.default_format = format.to_sym
end
- attr_accessor :type, :verb, :version, :arguments
- attr_reader :name
+ attr_accessor :summary
+ def summary(value = nil)
+ @summary = value unless value.nil?
+ @summary
+ end
+
+ attr_reader :name, :version
def initialize(name, version, &block)
unless Puppet::Interface::FaceCollection.validate_version(version)