Sha256: 7d4b056e4eda16d9e6fe8a0010787bde7fd46bf0e46d8886db043e8364f83b7f

Contents?: true

Size: 814 Bytes

Versions: 4

Compression:

Stored size: 814 Bytes

Contents

# frozen_string_literal: true

module Vedeu

  module Events

    # Allows the storing of events.
    #
    class Repository < Vedeu::Repositories::Repository

      singleton_class.send(:alias_method, :events, :repository)

      class << self

        # Remove all stored models from the repository.
        #
        # @example
        #   Vedeu.events.reset!
        #
        # @return [Vedeu::Events::Repository]
        def reset!
          @events = new(Vedeu::Events::Collection)
        end
        alias reset reset!

      end # Eigenclass

    end # Repository

  end # Events

  # Manipulate the repository of events.
  #
  # @example
  #   Vedeu.events
  #
  # @!method events
  # @return [Vedeu::Events::Repository]
  def_delegators Vedeu::Events::Repository,
                 :events

end # Vedeu

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vedeu-0.8.10 lib/vedeu/events/repository.rb
vedeu-0.8.9 lib/vedeu/events/repository.rb
vedeu-0.8.8 lib/vedeu/events/repository.rb
vedeu-0.8.7 lib/vedeu/events/repository.rb