Since some actions take arguments and some do not, action synopses were incomplete and ambiguous.
This commit adds a method for explicitly declaring what argument(s) an action takes, and places the arguments at the appropriate spot in the action's synopsis. By convention, individual arguments should be wrapped in angle brackets. Signed-off-by: nfagerlund <[email protected]> --- Local-branch: ticket/2.7.x/7561-help_for_all_faces lib/puppet/interface/action.rb | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/lib/puppet/interface/action.rb b/lib/puppet/interface/action.rb index 3c377a4..748888c 100644 --- a/lib/puppet/interface/action.rb +++ b/lib/puppet/interface/action.rb @@ -46,6 +46,7 @@ class Puppet::Interface::Action ######################################################################## # Documentation... attr_doc :returns + attr_doc :arguments def synopsis output = PrettyPrint.format do |s| s.text("puppet #{@face.name}") @@ -67,6 +68,7 @@ class Puppet::Interface::Action end end end + s.text(" #{arguments}") if arguments end end -- 1.7.3.3 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
