Sha256: 7b596453f4c100ed0a932968f58e17e9ab56f6656d784dff082998183cc4b16a

Contents?: true

Size: 198 Bytes

Versions: 3

Compression:

Stored size: 198 Bytes

Contents

module Coercer

  class Baz
    def self.coerce(arg, default = nil)
      if arg.nil?
        default.lambda? ? default.call : default
      else
        ::Baz.new(arg)
      end
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
attribrutal-0.0.6 spec/support/models/coercer.rb
attribrutal-0.0.5 spec/support/models/coercer.rb
attribrutal-0.0.4 spec/support/models/coercer.rb