Module: Octopi::Resource
Public Visibility
Public Class Method Details
for
public
for(name)
[View source]
10 11 12 |
# File 'lib/octopi/resource.rb', line 10 def self.for(name) @@resources[name] end |
included
public
included(base)
[View source]
3 4 5 6 7 8 |
# File 'lib/octopi/resource.rb', line 3 def self.included(base) base.extend ClassMethods base.set_resource_name(base.name) (@@resources||={})[base.resource_name(:singular)] = base (@@resources||={})[base.resource_name(:plural)] = base end |