wilsonsilva/memoria

View on GitHub
lib/memoria/snapshot.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module Memoria
  # Stores the snapshot details.
  class Snapshot
    # Returns the name of the snapshot. Each snapshot should have a unique name.
    #
    # @example
    #   snapshot = Snapshot.new('listing-all-users')
    #   snapshot.name #=> 'listing-all-users'
    #
    # @return [String] The name of the snapshot.
    #
    # @api public
    #
    attr_reader :name

    # Creates a new snapshot.
    #
    # @example
    #   snapshot = Snapshot.new('listing-all-users')
    #
    # @param [String] name The storage key (name) of the snapshot.
    #
    # @return [Snapshot] An instance of +Snapshot+.
    #
    # @api public
    #
    def initialize(name)
      @name = name
    end
  end
end