Class: ActiveRecord::DatabaseConfigurations::HashConfig
- Inherits:
-
Object
- Object
- ActiveRecord::DatabaseConfigurations::HashConfig
- Defined in:
- lib/pg_rls/database/configurations.rb
Instance Method Summary collapse
- #admin_configuration_hash ⇒ Object
- #configuration_hash ⇒ Object
-
#initialize(env_name, name, configuration_hash) ⇒ HashConfig
constructor
A new instance of HashConfig.
- #rls_configuration_hash ⇒ Object
Constructor Details
#initialize(env_name, name, configuration_hash) ⇒ HashConfig
Returns a new instance of HashConfig.
9 10 11 12 13 |
# File 'lib/pg_rls/database/configurations.rb', line 9 def initialize(env_name, name, configuration_hash) @env_name = env_name @name = name @configuration_hash = configuration_hash end |
Instance Method Details
#admin_configuration_hash ⇒ Object
21 22 23 |
# File 'lib/pg_rls/database/configurations.rb', line 21 def admin_configuration_hash @admin_configuration_hash ||= @configuration_hash end |
#configuration_hash ⇒ Object
15 16 17 18 19 |
# File 'lib/pg_rls/database/configurations.rb', line 15 def configuration_hash return admin_configuration_hash if PgRls.as_db_admin? rls_configuration_hash end |