Module: Nasreddin

Defined in:
lib/nasreddin/version.rb,
lib/nasreddin/resource.rb,
lib/nasreddin/api-server.rb,
lib/nasreddin/remote_torquebox_adapter.rb

Defined Under Namespace

Classes: APIServer, APIServerResource, RemoteTorqueboxAdapter, Resource, SaveError

Constant Summary collapse

VERSION =
'0.3.10'

Class Method Summary collapse

Class Method Details

.Resource(name) ⇒ Object



167
168
169
170
171
172
173
174
# File 'lib/nasreddin/resource.rb', line 167

def self.Resource(name)
  klass = Resource.subclasses.find { |k| k.resource == name }
  unless klass
    klass = Class.new(Resource)
    klass.resource = name
  end
  klass
end