Sha256: 8aa4260d842323cb0db4aeeeda11fbd558c7d55fdcae476e9de2a46e8ae4e9e5

Contents?: true

Size: 448 Bytes

Versions: 7

Compression:

Stored size: 448 Bytes

Contents

module DevboxLauncher
  class AccountConfig

    attr_reader :account_name

    def initialize(account_name, config)
      @account_name = account_name
      @config = config
    end

    def find_box_config(box_name)
      box_config = @config.find { |c| c["box"] == box_name }

      if box_config.nil?
        fail "No box config found for #{box_name} under account #{account_name}"
      end

      BoxConfig.new(box_config)
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
devbox_launcher-1.1.1 lib/devbox_launcher/models/account_config.rb
devbox_launcher-1.1.0 lib/devbox_launcher/models/account_config.rb
devbox_launcher-1.0.0 lib/devbox_launcher/models/account_config.rb
devbox_launcher-0.7.1 lib/devbox_launcher/models/account_config.rb
devbox_launcher-0.7.0 lib/devbox_launcher/models/account_config.rb
devbox_launcher-0.6.1 lib/devbox_launcher/models/account_config.rb
devbox_launcher-0.6.0 lib/devbox_launcher/models/account_config.rb