Class: Recheck::Optimist::StringOption
- Defined in:
- lib/recheck/vendor/optimist.rb
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 Recheck::Optimist::Option
Instance Method Details
#as_type(val) ⇒ Object
1115 1116 1117 |
# File 'lib/recheck/vendor/optimist.rb', line 1115 def as_type(val) val.to_s end |
#parse(paramlist, _neg_given) ⇒ Object
1123 1124 1125 |
# File 'lib/recheck/vendor/optimist.rb', line 1123 def parse(paramlist, _neg_given) paramlist.map { |pg| pg.map { |param| as_type(param) } } end |
#type_format ⇒ Object
1119 1120 1121 |
# File 'lib/recheck/vendor/optimist.rb', line 1119 def type_format "=<s>" end |