Class: Array

Inherits:
Object show all
Defined in:
lib/detroit/core_ext/to_console.rb,
lib/detroit/core_ext/to_list.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#to_argvObject



22
23
24
25
26
# File 'lib/detroit/core_ext/to_console.rb', line 22

def to_argv
  flags = (Hash===last ? pop : {})
  flags = flags.to_argv
  flags + self
end

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



11
12
13
14
15
16
# File 'lib/detroit/core_ext/to_console.rb', line 11

def to_console
  #flags = (Hash===last ? pop : {})
  #flags = flags.to_console
  #flags + ' ' + join(" ")
  to_argv.join(' ')
end

#to_listObject



3
4
5
# File 'lib/detroit/core_ext/to_list.rb', line 3

def to_list
  self
end