Module: FirstExisting

Included in:
Kernel
Defined in:
lib/first_existing.rb,
lib/first_existing/version.rb

Constant Summary collapse

VERSION =
"1.2.2"

Instance Method Summary collapse

Instance Method Details

#first_existing(*args) ⇒ Object



6
7
8
9
# File 'lib/first_existing.rb', line 6

def first_existing *args
  args.each { |a| return a unless a.nil? }
  nil
end