Module: Octopi::Resource

Public Visibility

Public Class Method Summary

for(name)
included(base)

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
Generated on Friday, July 31 2009 at 05:01:55 PM by YARD 0.2.3.2 (ruby-1.8.6).