Class: Array
- Defined in:
- lib/ratch/core_ext/to_list.rb,
lib/ratch/core_ext/to_console.rb
Instance Method Summary collapse
-
#to_console ⇒ Object
(also: #to_params)
Convert an array into commandline parameters.
- #to_list ⇒ Object
Instance Method Details
#to_console ⇒ Object Also known as: to_params
Convert an array into commandline parameters. The array is accepted in the format of Ruby method arguments –ie. [arg1, arg2, …, hash]
8 9 10 11 12 |
# File 'lib/ratch/core_ext/to_console.rb', line 8 def to_console flags = (Hash===last ? pop : {}) flags = flags.to_console flags + ' ' + join(" ") end |
#to_list ⇒ Object
3 4 5 |
# File 'lib/ratch/core_ext/to_list.rb', line 3 def to_list self end |