Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 027c3f0ab2
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (19 sloc) 0.503 kB
module Xapit
module Client
class AbstractModelAdapter
def self.inherited(subclass)
@@subclasses ||= []
@@subclasses << subclass
end
def self.adapter_class(model_class)
@@subclasses.detect { |subclass| subclass.for_class?(model_class) } || DefaultModelAdapter
end
def self.for_class?(model_class)
false # override in subclass
end
def initialize(model_class)
@model_class = model_class
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.