Class: Cuscuz::Operation

Inherits:
Object
  • Object
show all
Extended by:
Literal::Properties
Defined in:
lib/cuscuz/operation.rb

Defined Under Namespace

Modules: Executor

Constant Summary collapse

Result =
Cuscuz::Result
RESULT_CLASSES =
_Union(Cuscuz::Result::Success, Cuscuz::Result::Failure)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.callObject



9
# File 'lib/cuscuz/operation.rb', line 9

def self.call(...) = new(...).call

.call!Object



11
# File 'lib/cuscuz/operation.rb', line 11

def self.call!(...) = new(...).call!

.inherited(operation) ⇒ Object



13
14
15
16
17
# File 'lib/cuscuz/operation.rb', line 13

def self.inherited(operation)
  super

  operation.prepend(Executor)
end

Instance Method Details

#callObject

Raises:

  • (NoMethodError)


19
20
21
# File 'lib/cuscuz/operation.rb', line 19

def call
  raise NoMethodError, "`#call` instance method should be implemented in #{self.class.name}"
end