Method: UtopiaData::Application#find_or_create_resource

Defined in:
lib/utopia_data/application.rb

#find_or_create_resource(name, options = {}, &block) ⇒ Object

:nodoc:



77
78
79
80
81
# File 'lib/utopia_data/application.rb', line 77

def find_or_create_resource(name, options = {}, &block) # :nodoc:
  return @resources[name] if resources[name]
  resource = Resource.new(name, options, &block)
  @resources[name] = resource
end