Module: SmartCore::Operation::Interface::Result

Included in:
SmartCore::Operation
Defined in:
lib/smart_core/operation/interface/result.rb

Overview

rubocop:disable Naming/MethodName

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#Callback(&callback) ⇒ SmartCore::Operation::Result::Callback

Parameters:

  • callback (Block)

Returns:

Since:

  • 0.1.0



39
40
41
# File 'lib/smart_core/operation/interface/result.rb', line 39

def Callback(&callback)
  SmartCore::Operation::Result::Callback.new(&callback)
end

#Failure(*result_attributes) ⇒ SmartCore::Operation::Result::Failure

Parameters:

  • result_attributs (Array<Any>)

Returns:

Since:

  • 0.1.0



21
22
23
# File 'lib/smart_core/operation/interface/result.rb', line 21

def Failure(*result_attributes)
  SmartCore::Operation::Result::Failure.new(*result_attributes)
end

#Fatal(*result_attributes) ⇒ SmartCore::Operation::Result::Fatal

Parameters:

  • result_attributes (Array<Any>)

Returns:

Raises:

Since:

  • 0.1.0



30
31
32
# File 'lib/smart_core/operation/interface/result.rb', line 30

def Fatal(*result_attributes)
  raise(SmartCore::Operation::Result::Fatal.new(*result_attributes))
end

#Success(**result_attributes) ⇒ SmartCore::Operation::Result::Success

Parameters:

  • result_attributes (Hash<Symbol,Any>)

Returns:

Since:

  • 0.1.0



12
13
14
# File 'lib/smart_core/operation/interface/result.rb', line 12

def Success(**result_attributes)
  SmartCore::Operation::Result::Success.new(**result_attributes)
end