Class: ThisFeature::Configuration
- Inherits:
-
Object
- Object
- ThisFeature::Configuration
- Defined in:
- lib/this_feature/configuration.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#adapters ⇒ Object
17 18 19 |
# File 'lib/this_feature/configuration.rb', line 17 def adapters @adapters ||= [] end |
#base_data_lambda ⇒ Object
29 30 31 |
# File 'lib/this_feature/configuration.rb', line 29 def base_data_lambda @base_data_lambda ||= ->(_record) { {} } end |
#default_adapter ⇒ Object
21 22 23 |
# File 'lib/this_feature/configuration.rb', line 21 def default_adapter @default_adapter ||= adapters.first end |
Instance Method Details
#init ⇒ Object
5 6 7 |
# File 'lib/this_feature/configuration.rb', line 5 def init validate_adapters! end |
#validate_adapters! ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/this_feature/configuration.rb', line 9 def validate_adapters! raise NoAdaptersError unless adapters.any? adapters.each do |adapter| raise BadAdapterError, adapter unless adapter.class < Adapters::Base end end |