Class: BugshelfAPI::Base

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
lib/bugshelf/bugshelf-api.rb

Direct Known Subclasses

Issue, Project

Class Method Summary collapse

Class Method Details

.build_subclassObject



36
37
38
39
40
41
42
# File 'lib/bugshelf/bugshelf-api.rb', line 36

def self.build_subclass
  Class.new(self).tap do |c|
    c.element_name    = self.element_name
    c.collection_name = self.collection_name
    c.primary_key     = self.primary_key
  end
end

.inherited(base) ⇒ Object



31
32
33
34
# File 'lib/bugshelf/bugshelf-api.rb', line 31

def self.inherited(base)
  BugshelfAPI.resources << base
  super
end