Sha256: 3d78133dec8a5394ce72e061830d6d3baaab5e738c6cddfd6cb158ca46383f1f
Contents?: true
Size: 464 Bytes
Versions: 4
Compression:
Stored size: 464 Bytes
Contents
module Railroader module SafeCallHelper [[:process_safe_call, :process_call], [:process_safe_attrasgn, :process_attrasgn], [:process_safe_op_asgn, :process_op_asgn], [:process_safe_op_asgn2, :process_op_asgn2]].each do |call, replacement| define_method(call) do |exp| if self.respond_to? replacement self.send(replacement, exp) else process_default exp end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems