Module: SimpleOperation::Success::InstanceMethods

Defined in:
lib/simple_operation/success.rb

Instance Method Summary collapse

Instance Method Details

#failure?Boolean



26
27
28
# File 'lib/simple_operation/success.rb', line 26

def failure?
  false
end

#on_failure(reason = nil) ⇒ Object



18
19
20
# File 'lib/simple_operation/success.rb', line 18

def on_failure(reason = nil)
  self
end

#on_successObject



14
15
16
# File 'lib/simple_operation/success.rb', line 14

def on_success
  WrappedValue.new(yield self)
end

#success?Boolean



22
23
24
# File 'lib/simple_operation/success.rb', line 22

def success?
  true
end

#unwrapObject



30
31
32
# File 'lib/simple_operation/success.rb', line 30

def unwrap
  self
end