Class: Dsu::Services::Configuration::HydratorService
- Inherits:
-
Object
- Object
- Dsu::Services::Configuration::HydratorService
- Defined in:
- lib/dsu/services/configuration/hydrator_service.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(config_hash:, options: {}) ⇒ HydratorService
constructor
A new instance of HydratorService.
Constructor Details
#initialize(config_hash:, options: {}) ⇒ HydratorService
Returns a new instance of HydratorService.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/dsu/services/configuration/hydrator_service.rb', line 10 def initialize(config_hash:, options: {}) raise ArgumentError, 'config_hash is nil' if config_hash.nil? unless config_hash.is_a?(Hash) raise ArgumentError, "config_hash is the wrong object type: \"#{config_hash}\"" end raise ArgumentError, 'options is nil' if .nil? raise ArgumentError, "options is the wrong object type:\"#{}\"" unless .is_a?(Hash) @config_hash = config_hash.dup @options = || {} end |
Instance Method Details
#call ⇒ Object
24 25 26 |
# File 'lib/dsu/services/configuration/hydrator_service.rb', line 24 def call hydrate end |