Module: SimpleResult::Helpers

Defined in:
lib/simple_result/helpers.rb

Instance Method Summary collapse

Instance Method Details

#Failure(error = nil) ⇒ Object

rubocop:disable Naming/MethodName – These are helpers methods defined specifically like this to look similar with the classes



9
10
11
# File 'lib/simple_result/helpers.rb', line 9

def Failure(error = nil) # rubocop:disable Naming/MethodName -- These are helpers methods defined specifically like this to look similar with the classes
  SimpleResult::Failure.new(error:)
end

#Success(payload = nil) ⇒ Object

rubocop:disable Naming/MethodName – These are helpers methods defined specifically like this to look similar with the classes



5
6
7
# File 'lib/simple_result/helpers.rb', line 5

def Success(payload = nil) # rubocop:disable Naming/MethodName -- These are helpers methods defined specifically like this to look similar with the classes
  SimpleResult::Success.new(payload)
end