Sha256: 22940cade12d5e5be43e58c371f43471f905ea2dab70628e9e2d23f408fb99f9

Contents?: true

Size: 660 Bytes

Versions: 1

Compression:

Stored size: 660 Bytes

Contents

require_relative 'response/error'

module Momento
  # A response from creating a cache.
  class CreateCacheResponse < Response
    # Does the cache already exist?
    # @return [Boolean]
    def already_exists?
      false
    end

    # Was the cache created?
    # @return [Boolean]
    def success?
      false
    end

    # @private
    class AlreadyExists < CreateCacheResponse
      def already_exists?
        true
      end
    end

    # @private
    class Success < CreateCacheResponse
      def success?
        true
      end
    end

    # @private
    class Error < CreateCacheResponse
      include ::Momento::Response::Error
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
momento-0.2.0 lib/momento/create_cache_response.rb