Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 49791d662a859ffe826a5fbdf69c1767b4c2e03f 1 parent eccf7dd
@matheusmoreira authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/acclaim/option.rb
View
9 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
Please sign in to comment.
Something went wrong with that request. Please try again.