Module: Gemmy::Patches::ObjectPatch::InstanceMethods::GetArgOrError
- Defined in:
- lib/gemmy/patches/object_patch.rb
Overview
Shifts one ARGV and raises a message if it’s undefined.
Instance Method Summary collapse
Instance Method Details
#get_arg_or_error(msg) ⇒ Object
41 42 43 |
# File 'lib/gemmy/patches/object_patch.rb', line 41 def get_arg_or_error(msg) ([ARGV.shift, msg].tap &method(:error_if_blank)).shift end |