Class: Multitenant::Mysql::Configs::Base
- Inherits:
-
Object
- Object
- Multitenant::Mysql::Configs::Base
- Defined in:
- lib/multitenant-mysql/configs/base.rb
Instance Attribute Summary collapse
-
#bucket ⇒ Object
Returns the value of attribute bucket.
-
#models ⇒ Object
Returns the value of attribute models.
Instance Method Summary collapse
Instance Attribute Details
#bucket ⇒ Object
Returns the value of attribute bucket.
5 6 7 |
# File 'lib/multitenant-mysql/configs/base.rb', line 5 def bucket @bucket end |
#models ⇒ Object
Returns the value of attribute models.
5 6 7 |
# File 'lib/multitenant-mysql/configs/base.rb', line 5 def models @models end |
Instance Method Details
#tenant ⇒ Object
14 15 16 |
# File 'lib/multitenant-mysql/configs/base.rb', line 14 def tenant @bucket.model end |
#tenants_bucket(name) {|@bucket| ... } ⇒ Object
7 8 9 10 11 12 |
# File 'lib/multitenant-mysql/configs/base.rb', line 7 def tenants_bucket(name) raise InvalidBucketError.new('Multitenant::Mysql: invalid bucket') if name.blank? @bucket = Bucket.new(name) yield(@bucket) if block_given? end |