Sha256: 44488c94cab7c833fec89f7ce2397834c5125d8ed553eaef4c882bbe89337e7d

Contents?: true

Size: 701 Bytes

Versions: 14

Compression:

Stored size: 701 Bytes

Contents

module Ufo
  class Base
    extend Memoist
    include Stack::Helper

    def initialize(service, options={})
      @service = switch_current(service)
      @options = options

      @pretty_service_name = Ufo.pretty_service_name(@service)
      @cluster = @options[:cluster] || default_cluster
      @stack_name = adjust_stack_name(@cluster, @service)
    end

    def switch_current(service)
      Current.service!(service)
    end

    def info
      Info.new(@service, @options)
    end
    memoize :info

    def no_service_message
      <<-EOL
No #{@pretty_service_name.colorize(:green)} found.
No CloudFormation stack named #{@stack_name} found.
Are sure it exists?
      EOL
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ufo-4.1.10 lib/ufo/base.rb
ufo-4.1.9 lib/ufo/base.rb
ufo-4.1.8 lib/ufo/base.rb
ufo-4.1.7 lib/ufo/base.rb
ufo-4.1.6 lib/ufo/base.rb
ufo-4.1.5 lib/ufo/base.rb
ufo-4.1.4 lib/ufo/base.rb
ufo-4.1.2 lib/ufo/base.rb
ufo-4.1.1 lib/ufo/base.rb
ufo-4.1.0 lib/ufo/base.rb
ufo-4.0.3 lib/ufo/base.rb
ufo-4.0.2 lib/ufo/base.rb
ufo-4.0.1 lib/ufo/base.rb
ufo-4.0.0 lib/ufo/base.rb