lib/schema_comments/schema.rb in schema_comments-0.4.0 vs lib/schema_comments/schema.rb in schema_comments-0.4.1

- old
+ new

@@ -1,18 +1,14 @@ module SchemaComments module Schema - def self.included(mod) - mod.extend(ClassMethods) - mod.instance_eval do - alias :define_without_schema_comments :define - alias :define :define_with_schema_comments - end + def self.prepended(mod) + mod.singleton_class.prepend(ClassMethods) end module ClassMethods - def define_with_schema_comments(*args, &block) + def define(*args, &block) SchemaComments::SchemaComment.yaml_access do - define_without_schema_comments(*args, &block) + super(*args, &block) end end end end