Module: EventSourcery::Postgres::TableOwner::ClassMethods
- Defined in:
- lib/event_sourcery/postgres/table_owner.rb
Overview
Class methods for defining and managing database tables.
Instance Method Summary collapse
-
#table(name, &block) ⇒ Object
For the given table name assign to give block as the value.
-
#tables ⇒ Hash
Hash of the tables and their corresponding blocks.
Instance Method Details
#table(name, &block) ⇒ Object
For the given table name assign to give block as the value.
27 28 29 |
# File 'lib/event_sourcery/postgres/table_owner.rb', line 27 def table(name, &block) tables[name] = block end |
#tables ⇒ Hash
Hash of the tables and their corresponding blocks.
19 20 21 |
# File 'lib/event_sourcery/postgres/table_owner.rb', line 19 def tables @tables ||= {} end |