Class: Morpho::Operations::User::DeliverEmail
- Inherits:
-
Base::Find
- Object
- Trailblazer::Operation
- Base::Find
- Morpho::Operations::User::DeliverEmail
show all
- Defined in:
- app/concepts/morpho/operations/user/deliver_email.rb
Instance Method Summary
collapse
Methods inherited from Base::Find
#model_class!, #params!, #present!, #presenter_class!
Instance Method Details
#build_model!(_options) ⇒ Object
24
25
26
|
# File 'app/concepts/morpho/operations/user/deliver_email.rb', line 24
def build_model!(_options, **)
raise NotImplementedError
end
|
#check!(_options) ⇒ Object
28
29
30
|
# File 'app/concepts/morpho/operations/user/deliver_email.rb', line 28
def check!(_options, **)
raise NotImplementedError
end
|
#data!(options, params:) ⇒ Object
10
11
12
|
# File 'app/concepts/morpho/operations/user/deliver_email.rb', line 10
def data!(options, params:, **)
options['data'] = params['data'].is_a?(Hash) ? params.fetch('data') : {}
end
|
#deliver!(_options) ⇒ Object
32
33
34
|
# File 'app/concepts/morpho/operations/user/deliver_email.rb', line 32
def deliver!(_options, **)
raise NotImplementedError
end
|
#validate!(options, data:) ⇒ Object
14
15
16
17
18
19
20
21
22
|
# File 'app/concepts/morpho/operations/user/deliver_email.rb', line 14
def validate!(options, data:, **)
options['contract'] = options['contract.class'].new(OpenStruct.new)
unless options['contract'].validate(data)
raise Morpho::Exceptions::StandardError.new(
errors: options['contract'].errors
)
end
end
|