Converts a hash map into command-line arguments.
Monkey Patching:
require 'argvise' module A module_function include Argvise::HashMixin def demo puts({ path: '/path/to/dir' }.to_argv) #=> ["--path", "/path/to/dir"] puts({ path: '/path/to/dir' }.to_argv_bsd) #=> ["-path", "/path/to/dir"] end end A.demo Hash.method_defined?(:to_argv) # => true {}.respond_to?(:to_argv) #=> true