Sha256: 4aa4ef96f5d169c2c44c173940a6500928d74c66af9a5aeba9b6b6aa9e340096
Contents?: true
Size: 793 Bytes
Versions: 2
Compression:
Stored size: 793 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 = 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.4.25 | lib/vedeu/repositories/repositories/cursors.rb |
vedeu-0.4.24 | lib/vedeu/repositories/repositories/cursors.rb |