Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/ratch/dsl/console.rb

Instance Method Summary collapse

Instance Method Details

#not_empty?Boolean

Not empty?

Returns:

  • (Boolean)


75
76
77
# File 'lib/ratch/dsl/console.rb', line 75

def not_empty?
  !empty?
end

#to_consoleObject 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