class ParentService < Servitium::Service
context do
attribute :car
end
delegate :car, to: :context
def perform
puts car
end
end
class ChildService < ParentService
def perform
puts car
end
end
ParentService.perform(car: 'Ferrari')
ChildService.perform(car: 'Lada')
expected output:
actual output:
Ferrari
NameError: undefined local variable or method 'car' for an instance of Servitium::Context
expected output:
actual output: