Sha256: e7c85d8356940229c476d0765bfda3e65a68e7577fc7c641f75efeb63e826a34
Contents?: true
Size: 831 Bytes
Versions: 2
Compression:
Stored size: 831 Bytes
Contents
# frozen_string_literal: true require 'chamber/commands/base' module Chamber module Commands module Cloud class Base < Chamber::Commands::Base attr_accessor :adapter def initialize(options = {}) super self.adapter = adapter_class(options[:adapter]).new(options) end private def adapter_class(adapter_name) require "chamber/adapters/cloud/#{adapter_name}" @adapter_class ||= case adapter_name when 'circle_ci' Chamber::Adapters::Cloud::CircleCi when 'heroku' Chamber::Adapters::Cloud::Heroku else fail ArgumentError, "Invalid Chamber cloud adapter name: #{adapter_name}" end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
chamber-2.13.1 | lib/chamber/commands/cloud/base.rb |
chamber-2.13.0 | lib/chamber/commands/cloud/base.rb |