Class: LedgerSync::Domains::Operation::Resource
- Inherits:
-
Object
- Object
- LedgerSync::Domains::Operation::Resource
show all
- Includes:
- Mixin
- Defined in:
- lib/ledger_sync/domains/operation/resource.rb
Instance Attribute Summary
Attributes included from Mixin
#params, #result
Instance Method Summary
collapse
Methods included from Mixin
#==, #allowed?, #deep_serialize, #domain, #errors, #failure, #failure?, included, #inferred_validation_contract_class, #initialize, #local_domain, #perform, #performed?, #serialize, #serializer_class_for, #serializer_for, #serializer_module_for, #success, #success?, #valid?, #validate, #validation_contract_class
Instance Method Details
#resource_class ⇒ Object
9
10
11
|
# File 'lib/ledger_sync/domains/operation/resource.rb', line 9
def resource_class
@resource_class ||= inferred_resource_class
end
|
#validation_error_message ⇒ Object
13
14
15
16
17
|
# File 'lib/ledger_sync/domains/operation/resource.rb', line 13
def validation_error_message
errors.messages.map do |e|
"#{e.path.first.to_s.gsub('_', ' ').capitalize} #{e.text}"
end.to_sentence
end
|