Method: Upframework::BaseService#initialize
- Defined in:
- app/services/upframework/base_service.rb
#initialize(**attributes) ⇒ BaseService
Returns a new instance of BaseService.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/services/upframework/base_service.rb', line 12 def initialize(**attributes) @errors = [] self.class.send(:attr_reader, *attributes.keys) #TODO: Remove. This should be handled on the child class. attributes.each do |key, value| instance_variable_set("@#{key}", value) end post_initialize(**attributes) end |