Sha256: 5b09b6be712f6ed8ee12f21ab734b04ff2e2e417f77ddf1156cf1a1bed0591ad
Contents?: true
Size: 808 Bytes
Versions: 5
Compression:
Stored size: 808 Bytes
Contents
module Vedeu # Allows the storing of each interface's cursor. class Cursors < Repository class << self # @return [Vedeu::Cursors] def cursors @cursors ||= reset! end alias_method :repository, :cursors # @return [Vedeu::Cursor] def cursor cursors.by_name(Vedeu.focus) if Vedeu.focus end # Remove all stored models from the repository. # # @return [Vedeu::Cursors] def reset! @cursors = Vedeu::Cursors.register(Vedeu::Cursor) end end # @param name [String] The name of the stored cursor. # @return [Vedeu::Cursor] def by_name(name) if registered?(name) find(name) else Vedeu::Cursor.new(name: name).store end end end # Cursors end # Vedeu
Version data entries
5 entries across 5 versions & 1 rubygems