Module: LedgerSync::ResultBase

Included in:
OperationResult, Result, SearchResult, ValidationResult
Defined in:
lib/ledger_sync/result.rb

Defined Under Namespace

Modules: HelperMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/ledger_sync/result.rb', line 15

def self.included(base)
  base.const_set('Success', Class.new(Resonad::Success))
  base::Success.include base::ResultTypeBase if base.const_defined?('ResultTypeBase')

  base.const_set('Failure', Class.new(Resonad::Failure))
  base::Failure.include base::ResultTypeBase if base.const_defined?('ResultTypeBase')

  base.extend HelperMethods
end