Class: ROM::Schema
- Inherits:
-
Object
- Object
- ROM::Schema
- Includes:
- Adamantium::Flat
- Defined in:
- lib/rom/schema.rb,
lib/rom/schema/definition.rb,
lib/rom/schema/definition/relation.rb,
lib/rom/schema/definition/relation/base.rb
Overview
Schema builder DSL
Defined Under Namespace
Classes: Definition
Class Method Summary collapse
-
.build(repositories, &block) ⇒ Schema
Build a relation schema.
Instance Method Summary collapse
-
#[](name) ⇒ Axiom::Relation, Axiom::Relation::Base
Return defined relation identified by name.
- #call(&block) ⇒ Object private
Class Method Details
.build(repositories, &block) ⇒ Schema
Build a relation schema
24 25 26 |
# File 'lib/rom/schema.rb', line 24 def self.build(repositories, &block) new(Definition.new(repositories, &block)) end |
Instance Method Details
#[](name) ⇒ Axiom::Relation, Axiom::Relation::Base
Return defined relation identified by name
37 38 39 |
# File 'lib/rom/schema.rb', line 37 def [](name) definition[name] end |
#call(&block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
42 43 44 45 |
# File 'lib/rom/schema.rb', line 42 def call(&block) definition.instance_eval(&block) self end |