Class: Muina::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/muina/result.rb,
lib/muina/result/failure.rb,
lib/muina/result/success.rb

Direct Known Subclasses

Failure, Success

Defined Under Namespace

Classes: Failure, Success

Class Method Summary collapse

Class Method Details

.failure(error) ⇒ Object



11
12
13
# File 'lib/muina/result.rb', line 11

def self.failure(error)
  Failure.__send__(:new, error)
end

.success(value) ⇒ Object



7
8
9
# File 'lib/muina/result.rb', line 7

def self.success(value)
  Success.__send__(:new, value)
end