How can I simplify this method?
def check(foo, bar = nil)
if bar
@object.foo > foo && @object.bar > bar
else
@object.foo > foo
end
end
|
How can I simplify this method?
|
|||
|
|
Another option if such checks are common place and longer.
|
||||
|
|