Sha256: ea76f5eaac9cbcc3fdb1afb2225ab390bc9fbf683f89ede1670fd72fb5bc8749

Contents?: true

Size: 851 Bytes

Versions: 9

Compression:

Stored size: 851 Bytes

Contents

# frozen_string_literal: true

module Vedeu

  module Events

    # Allows the storing of events.
    #
    # @api private
    #
    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::Events)
        end
        alias reset reset!

      end # Eigenclass

    end # Repository

  end # Events

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

end # Vedeu

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
vedeu-0.8.20 lib/vedeu/events/repository.rb
vedeu-0.8.19 lib/vedeu/events/repository.rb
vedeu-0.8.18 lib/vedeu/events/repository.rb
vedeu-0.8.17 lib/vedeu/events/repository.rb
vedeu-0.8.16 lib/vedeu/events/repository.rb
vedeu-0.8.15 lib/vedeu/events/repository.rb
vedeu-0.8.14 lib/vedeu/events/repository.rb
vedeu-0.8.13 lib/vedeu/events/repository.rb
vedeu-0.8.12 lib/vedeu/events/repository.rb