Class: Muina::Result::Success

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

Instance Method Summary collapse

Methods inherited from Muina::Result

failure, success

Constructor Details

#initialize(value) ⇒ Success

rubocop:disable Lint/MissingSuper



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

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

Instance Method Details

#error!Object



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

def error!
  raise
end

#value!Object



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

def value!
  @value
end