Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.72 KB | None | 0 0
  1. class ApplicationService
  2.   attr_reader :errors
  3.  
  4.   def initialize
  5.     @errors = {}
  6.   end
  7. end
  8.  
  9. class BaseService < ApplicationService
  10.   attr_reader :profile, :params
  11.  
  12.   def initialize(profile, params = {})
  13.     @profile = profile
  14.     @params = params
  15. end
  16.  
  17. class CreateService < BaseService
  18.   def initialize(another_param:, one_more_param:)
  19.     @another_param = another_param
  20.     @one_more_param = one_more_param
  21.  
  22.     super() # <= выебуется, что нужно сюда чет вставить, я так понимаю @profile and @params?
  23.     # и CreateService.run!(profile, params, another_param, one_more_param)
  24.     #сюда можно же передать этот самый profile и params
  25.   end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement