Sha256: 6fde6d1ef0e2a69b71b653ee4c1d14af08a05de9c36389bad75b2fe25bf8cb8c

Contents?: true

Size: 669 Bytes

Versions: 2

Compression:

Stored size: 669 Bytes

Contents

module Vedeu

  # Allows the storing of view buffers.
  #
  class Buffers < Repository

    class << self

      # @return [Vedeu::Buffers]
      def buffers
        @buffers ||= reset!
      end
      alias_method :repository, :buffers

      # @return [Vedeu::Buffers]
      def reset!
        @buffers = Vedeu::Buffers.register_repository(Vedeu::Buffer)
      end

    end

    # @param name [String] The name of buffer to clear.
    # @return [void]
    def clear(name)
      find!(name).clear
    end

    # @param name [String] The name of buffer to render.
    # @return [void]
    def render(name)
      find!(name).render
    end

  end # Buffers

end # Vedeu

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vedeu-0.4.17 lib/vedeu/repositories/repositories/buffers.rb
vedeu-0.4.16 lib/vedeu/repositories/repositories/buffers.rb