lib/concerned/module_ext.rb in concerned-0.1.1 vs lib/concerned/module_ext.rb in concerned-0.1.2

- old
+ new

@@ -28,10 +28,15 @@ self.extend [concern_ns, 'ClassMethods'].join('::').constantize rescue end end end + + class_eval do + self.my_concerns += concerns.flatten if self.respond_to?(:my_concerns) + end + include_shared_concerns([options[:shared]].flatten.compact) end def include_shared_concerns(*concerns) concerns.flatten.each do |concern| @@ -46,9 +51,13 @@ self.extend [concern_ns, 'ClassMethods'].join('::').constantize rescue end end end + + class_eval do + self.my_shared_concerns += concerns.flatten if self.respond_to?(:shared_concerns) + end end alias_method :shared_concern, :shared_concerns alias_method :include_concern, :include_concerns alias_method :include_shared_concern, :include_shared_concerns