Sha256: 8f1d090a66f1038d64f37f55b746d19f537b2ea53baa8f055d2c10ae092e9eb7

Contents?: true

Size: 686 Bytes

Versions: 2

Compression:

Stored size: 686 Bytes

Contents

module Brewmaster
  class Coordinator
    attr_accessor :configuration

    def initialize(configuration)
      self.configuration = configuration
    end

    def run
      if configuration.bootstrap?
        Brewmaster.bootstrap!
      else
        Brewmaster.setup_load_paths
      end

      run_brews
      run_casks
      run_rubies
    end

    def run_brews
      c = BrewCollection.new(configuration.brews)
      c.install_missing
      c.install_updates
    end

    def run_casks
      c = CaskCollection.new(configuration.casks)
      c.install_missing
    end

    def run_rubies
      c = RubyCollection.new(configuration.rubies)
      c.install_missing
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
brewmaster-0.0.2 lib/brewmaster/coordinator.rb
brewmaster-0.0.1 lib/brewmaster/coordinator.rb