Module: Argvise::HashExt
- Defined in:
- lib/argvise/core.rb
Overview
Instance Method Summary collapse
-
#to_argv(opts = nil) ⇒ Array<String>
Converts a hash map into GNU-style command-line arguments.
-
#to_argv_bsd(options = {}) ⇒ Array<String>
Converts a hash map into BSD-style command-line arguments.
Instance Method Details
#to_argv(opts = nil) ⇒ Array<String>
Converts a hash map into GNU-style command-line arguments.
289 290 291 |
# File 'lib/argvise/core.rb', line 289 def to_argv(opts = nil) Argvise.build(self, opts:) end |
#to_argv_bsd(options = {}) ⇒ Array<String>
Converts a hash map into BSD-style command-line arguments.
306 307 308 309 310 311 312 |
# File 'lib/argvise/core.rb', line 306 def to_argv_bsd( = {}) # if options is not Hash Type => {} = {} unless .is_a?(::Hash) opts = .merge({ bsd_style: true }) Argvise.build(self, opts:) end |