class Normally::HappyPath
Public Class Methods
new(happy_proc)
click to toggle source
# File lib/normally.rb, line 7 def initialize(happy_proc) @happy_proc = happy_proc end
Public Instance Methods
but_if(condition) { |: call| ... }
click to toggle source
# File lib/normally.rb, line 11 def but_if(condition) condition ? yield : @happy_proc.call end