Class: Turf::Lookup

Inherits:
Object
  • Object
show all
Defined in:
lib/turf/lookup.rb

Instance Method Summary collapse

Instance Method Details

#find(message) ⇒ Object

Raises:

  • (NoMethodError)


3
4
5
6
7
8
# File 'lib/turf/lookup.rb', line 3

def find(message)
  lookup_path.each do |obj|
    return obj.send(message) if obj.respond_to?(message)
  end
  raise NoMethodError, "The #{message} method could not be found in any of these Turf configuration classes: #{classes.join(", ")}"
end