How define a method which takes an optional argument w/ a default value, but you have to distinguish whether the default arg or no arg was passed in?
class Foo
def bar(a = "whatevs")
# Was "whatevs" passed in, or no arg?
end
end
Two very different examples that distinguish between nil
and no arg: