Browse files

Update Acclaim::Option#initialize documentation

Document that the default value can be used to implicitly set the type of
the option.
  • Loading branch information...
matheusmoreira committed Jul 9, 2012
1 parent eccf7dd commit 49791d662a859ffe826a5fbdf69c1767b4c2e03f
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/acclaim/option.rb
@@ -50,9 +50,12 @@ class Option
# Strings that don't follow the switch format are assumed to be
# descriptions.
- # The type is given as a module or class, and must be a registered {Type}.
- # Types are used in {#convert_parameters automatic parameter conversion}.
- # The default type is {Type::String String}.
+ # The type of the option's parameters is given as a module or class, and
+ # must be a {Type.registered? registered type}. Types are needed for
+ # {#convert_parameters automatic parameter conversion}. If omitted, the
+ # class of the supplied default value will be used if it is a registered
+ # type. If the type cannot be determined, it will be assumed to be
+ # {Type::String String}.
# If given a block, it will be called when the option is found in the
# command line. The block will receive a ribbon as its first argument. If

0 comments on commit 49791d6

Please sign in to comment.