Sha256: 97fc586079c517b2c15755808fc9cf16c73bfe54f78241e997566b5c114539d9

Contents?: true

Size: 1017 Bytes

Versions: 8

Compression:

Stored size: 1017 Bytes

Contents

module Vedeu

  module Cursors

    # Allows the storing of each interface's cursor.
    #
    class Repository < Vedeu::Repositories::Repository

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

      class << self

        # Fetch the cursor of the currently focussed interface/view.
        #
        # @example
        #   Vedeu.cursor
        #
        # @return [NilClass|Vedeu::Cursors::Cursor]
        def cursor
          cursors.by_name
        end

      end # Eigenclass

      null Vedeu::Cursors::Cursor
      real Vedeu::Cursors::Cursor

    end # Repository

    class Cursor

      repo Vedeu::Cursors::Repository.repository

    end # Cursor

  end # Cursors

  # Manipulate the repository of cursors.
  #
  # @example
  #   Vedeu.cursors
  #
  # @!method cursors
  #   @return [Vedeu::Cursors::Repository]
  # @!method cursor
  #   @see Vedeu::Cursors::Repository.cursor
  def_delegators Vedeu::Cursors::Repository,
                 :cursor,
                 :cursors

end # Vedeu

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vedeu-0.8.0 lib/vedeu/cursors/repository.rb
vedeu-0.7.4 lib/vedeu/cursors/repository.rb
vedeu-0.7.3 lib/vedeu/cursors/repository.rb
vedeu-0.7.2 lib/vedeu/cursors/repository.rb
vedeu-0.7.1 lib/vedeu/cursors/repository.rb
vedeu-0.7.0 lib/vedeu/cursors/repository.rb
vedeu-0.6.71 lib/vedeu/cursors/repository.rb
vedeu-0.6.70 lib/vedeu/cursors/repository.rb