Class: Slop::RegexpOption
Overview
Cast the option argument to a Regexp.
Constant Summary
Constants inherited from Option
Instance Attribute Summary
Attributes inherited from Option
#block, #config, #count, #desc, #flags, #value
Instance Method Summary collapse
Methods inherited from Option
#default_value, #ensure_call, #expects_argument?, #finish, #flag, #help?, #initialize, #key, #null?, #required?, #reset, #suppress_errors?, #tail, #tail?, #to_s, #underscore_flags?, #valid?, #validate_type?
Constructor Details
This class inherits a constructor from Slop::Option
Instance Method Details
#call(value) ⇒ Object
119 120 121 |
# File 'lib/slop/types.rb', line 119 def call(value) Regexp.new(value) end |