Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/ratch/dsl/console.rb
Instance Method Summary collapse
-
#not_empty? ⇒ Boolean
Not empty?.
-
#to_console ⇒ Object
(also: #to_params)
Convert an array into command line parameters.
Instance Method Details
#not_empty? ⇒ Boolean
Not empty?
75 76 77 |
# File 'lib/ratch/dsl/console.rb', line 75 def not_empty? !empty? end |
#to_console ⇒ Object Also known as: to_params
Convert an array into command line parameters. The array is accepted in the format of Ruby method arguments –ie. [arg1, arg2, …, hash]
83 84 85 86 87 |
# File 'lib/ratch/dsl/console.rb', line 83 def to_console flags = (Hash===last ? pop : {}) flags = flags.to_console flags + ' ' + join(" ") end |