Class: Vedeu::Groups
- Inherits:
-
Repository
- Object
- Repository
- Vedeu::Groups
- Defined in:
- lib/vedeu/repositories/repositories/groups.rb
Overview
Allows the storing of view groups.
Class Method Summary collapse
- .groups ⇒ Vedeu::Groups (also: repository)
-
.reset! ⇒ Vedeu::Groups
Remove all stored models from the repository.
Instance Method Summary collapse
Methods included from Store
#each, #empty?, #exists?, #reset, #size, #storage
Methods included from Registerable
Methods included from Common
Constructor Details
This class inherits a constructor from Vedeu::Repository
Class Method Details
.groups ⇒ Vedeu::Groups Also known as: repository
9 10 11 |
# File 'lib/vedeu/repositories/repositories/groups.rb', line 9 def groups @groups ||= reset! end |
Instance Method Details
#by_name(name) ⇒ Vedeu::Group
25 26 27 28 29 30 31 32 33 |
# File 'lib/vedeu/repositories/repositories/groups.rb', line 25 def by_name(name) if registered?(name) find(name) else Vedeu::Group.new(name: name).store end end |