removed ObjectSpace usage
This commit is contained in:
parent
295c0f0511
commit
5e0632c1d0
|
@ -15,7 +15,8 @@ module CouchRest
|
||||||
include CouchRest::Mixins::ClassProxy
|
include CouchRest::Mixins::ClassProxy
|
||||||
|
|
||||||
def self.subclasses
|
def self.subclasses
|
||||||
ObjectSpace.enum_for(:each_object, class << self; self; end).to_a.delete_if{|k| k == self}
|
@subclasses ||= []
|
||||||
|
# ObjectSpace.enum_for(:each_object, class << self; self; end).to_a.delete_if{|k| k == self}
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.inherited(subklass)
|
def self.inherited(subklass)
|
||||||
|
@ -25,6 +26,7 @@ module CouchRest
|
||||||
subklass.properties = self.properties.dup
|
subklass.properties = self.properties.dup
|
||||||
end
|
end
|
||||||
EOS
|
EOS
|
||||||
|
subclasses << subklass
|
||||||
end
|
end
|
||||||
|
|
||||||
# Accessors
|
# Accessors
|
||||||
|
|
Loading…
Reference in a new issue