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
282 283 284 |
# File 'lib/gemmy/patches/object_patch.rb', line 282 def get_arg_or_error(msg) ([ARGV.shift, msg].tap &method(:error_if_blank)).shift end |