Class: Docker::Template::Interface

Inherits:
Object
  • Object
show all
Defined in:
lib/docker/template/interface.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv = []) ⇒ Interface

Returns a new instance of Interface.



8
9
10
# File 'lib/docker/template/interface.rb', line 8

def initialize(argv = [])
  @argv = argv
end

Class Method Details

.push?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/docker/template/interface.rb', line 14

def self.push?
  ARGV.include?("--push")
end

Instance Method Details

#runObject



20
21
22
23
24
25
26
27
28
29
# File 'lib/docker/template/interface.rb', line 20

def run
  unless only_sync?
    Parser.new(argv_without_flags).parse.map do |repo|
      repo.disable_sync! if wants_sync?
      repo.build
    end
  end

  sync
end