Class: Poser::Util

Inherits:
Object
  • Object
show all
Defined in:
lib/poser/util.rb

Class Method Summary collapse

Class Method Details

.first_available_class(*class_names) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/poser/util.rb', line 5

def first_available_class(*class_names)
  class_names.flatten!
  if class_name = class_names.shift
    constantize_string class_name
  end
rescue NameError
  retry
end