Class: NilClass

Inherits:
Object show all
Defined in:
lib/hobo_support/methodcall.rb

Instance Method Summary collapse

Instance Method Details

#_?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/hobo_support/methodcall.rb', line 59

def _?()
  SafeNil.instance
end

#try(*args) ⇒ Object



64
65
66
67
68
69
70
71
72
# File 'lib/hobo_support/methodcall.rb', line 64

def try(*args)
  if args.length==0
    # Hobo style try
    CallIfAvailable.new(self)
  else
    # activesupport 2.3 style try
    nil
  end
end