Class: ROM::Repository::Root
- Inherits:
-
ROM::Repository
- Object
- ROM::Repository
- ROM::Repository::Root
- Defined in:
- repository/lib/rom/repository/root.rb
Overview
A specialized repository type dedicated to work with a root relation
This repository type builds commands and aggregates for its root relation
Instance Attribute Summary collapse
- #root ⇒ Object readonly
Class Method Summary collapse
-
.root ⇒ Object
Get or set repository root relation identifier.
Instance Method Summary collapse
-
#initialize ⇒ Root
constructor
A new instance of Root.
Constructor Details
#initialize ⇒ Root
Returns a new instance of Root.
61 62 63 64 |
# File 'repository/lib/rom/repository/root.rb', line 61 def initialize(*) super @root = set_relation(self.class.root) end |
Instance Attribute Details
#root ⇒ Object (readonly)
50 51 52 |
# File 'repository/lib/rom/repository/root.rb', line 50 def root @root end |
Class Method Details
.root ⇒ Symbol .root(identifier) ⇒ Symbol
Get or set repository root relation identifier
This method is automatically used when you define a class using MyRepo[:rel_identifier] shortcut
46 |
# File 'repository/lib/rom/repository/root.rb', line 46 defines :root |