Class: Optimist::StringOption
Overview
Option class for handling Strings.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Option
#default, #long, #multi_given, #name, #permitted, #permitted_response, #short
Instance Method Summary collapse
Methods inherited from Option
#array_default?, #callback, create, #desc, #doesnt_need_autogen_short, #educate, #flag?, #format_stdio, #full_description, #initialize, #multi, #multi_arg?, #opts, #opts=, #permitted_type_valid?, #permitted_valid_string, #permitted_value?, register_alias, #required?, #single_arg?, #validate_permitted
Constructor Details
This class inherits a constructor from Optimist::Option
Instance Method Details
#as_type(val) ⇒ Object
1065 |
# File 'lib/optimist.rb', line 1065 def as_type(val) ; val.to_s ; end |
#parse(paramlist, _neg_given) ⇒ Object
1067 1068 1069 |
# File 'lib/optimist.rb', line 1067 def parse(paramlist, _neg_given) paramlist.map { |pg| pg.map { |param| as_type(param) } } end |
#type_format ⇒ Object
1066 |
# File 'lib/optimist.rb', line 1066 def type_format ; "=<s>" ; end |