module Guaranteed

Constants

VERSION

Public Class Methods

Object(value = nil) click to toggle source

Ensures there is an object we can confidently pass messages to.

@param value an object, instance of any class @return the same object or a NullObject for instances of NilClass.

# File lib/guaranteed.rb, line 8
def self.Object(value = nil)
  case value
  when nil
    NullObject.new
  else
    value
  end
end