Module: CouchRest::ClassExtension
- Defined in:
- lib/couchrest/support/class.rb
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/couchrest/support/class.rb', line 30 def self.included(base) if CouchRest::ClassExtension::InstanceMethods.instance_methods.all? {|m| base.respond_to?(m)} # do nothing elsif CouchRest::ClassExtension::InstanceMethods.instance_methods.any? {|m| base.respond_to?(m)} raise RuntimeError, "Conflicting extentions to Class, work it out" else base.send(:include, CouchRest::ClassExtension::InstanceMethods) end end |