Class: Dru::Argv

Inherits:
Object
  • Object
show all
Defined in:
lib/dru/argv.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv = ARGV) ⇒ Argv

Returns a new instance of Argv.



7
8
9
# File 'lib/dru/argv.rb', line 7

def initialize(argv = ARGV)
  @argv = argv
end

Instance Attribute Details

#argvObject (readonly)

Returns the value of attribute argv.



5
6
7
# File 'lib/dru/argv.rb', line 5

def argv
  @argv
end

Instance Method Details

#parseObject



11
12
13
14
15
# File 'lib/dru/argv.rb', line 11

def parse
  return argv unless docker_compose_command_index

  argv.dup.insert(docker_compose_command_index, Thor::Options::OPTS_END)
end