Sha256: 5e95348455cc594a0a5646d3b4272fd53ff7a48d24b67f83d4a82847d0d7c273

Contents?: true

Size: 532 Bytes

Versions: 20

Compression:

Stored size: 532 Bytes

Contents

module Ufo::Docker
  class State
    extend Memoist

    def initialize(options={})
      @options = options
    end

    def update
      storage.update
    end

    def read
      storage.read
    end

  private
    # Examples:
    #   File.new(@docker_image, @options)
    #   S3.new(@docker_image, @options)
    def storage
      storage = Ufo.config.state.storage
      class_name = "Ufo::Docker::State::#{storage.camelize}"
      klass = class_name.constantize
      klass.new(@options)
    end
    memoize :storage
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ufo-6.3.13 lib/ufo/docker/state.rb
ufo-6.3.12 lib/ufo/docker/state.rb
ufo-6.3.11 lib/ufo/docker/state.rb
ufo-6.3.10 lib/ufo/docker/state.rb
ufo-6.3.9 lib/ufo/docker/state.rb
ufo-6.3.8 lib/ufo/docker/state.rb
ufo-6.3.7 lib/ufo/docker/state.rb
ufo-6.3.6 lib/ufo/docker/state.rb
ufo-6.3.5 lib/ufo/docker/state.rb
ufo-6.3.4 lib/ufo/docker/state.rb
ufo-6.3.3 lib/ufo/docker/state.rb
ufo-6.3.2 lib/ufo/docker/state.rb
ufo-6.3.1 lib/ufo/docker/state.rb
ufo-6.3.0 lib/ufo/docker/state.rb
ufo-6.2.5 lib/ufo/docker/state.rb
ufo-6.2.4 lib/ufo/docker/state.rb
ufo-6.2.3 lib/ufo/docker/state.rb
ufo-6.2.2 lib/ufo/docker/state.rb
ufo-6.2.1 lib/ufo/docker/state.rb
ufo-6.2.0 lib/ufo/docker/state.rb