Sha256: ef7093488e4d6c468c4074c6d27204812126b9f3e0c33fdc808d5e27e8160255

Contents?: true

Size: 623 Bytes

Versions: 4

Compression:

Stored size: 623 Bytes

Contents

module Ufo
  class Base
    extend Memoist
    include Stack::Helper

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

      @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 #{@service.color(:green)} found.
No CloudFormation stack named #{@stack_name} found.
Are sure it exists?
      EOL
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ufo-4.4.3 lib/ufo/base.rb
ufo-4.4.2 lib/ufo/base.rb
ufo-4.4.1 lib/ufo/base.rb
ufo-4.4.0 lib/ufo/base.rb