Class: Muina::Result::Failure

Inherits:
Muina::Result show all
Defined in:
lib/muina/result/failure.rb

Instance Method Summary collapse

Methods inherited from Muina::Result

failure, success

Constructor Details

#initialize(error) ⇒ Failure

rubocop:disable Lint/MissingSuper



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

def initialize(error) # rubocop:disable Lint/MissingSuper
  @error = error
  freeze
end

Instance Method Details

#error!Object



15
16
17
# File 'lib/muina/result/failure.rb', line 15

def error!
  @error
end

#value!Object



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

def value!
  raise
end