Sha256: 88070afd342903125485e6d91b67c3e7bb23dbdbe9ab41c63cdd0b0fec55e05f

Contents?: true

Size: 430 Bytes

Versions: 5

Compression:

Stored size: 430 Bytes

Contents

module Friendly
  module Document
    module Mixin
      # FIXME: I'm not in love with this. But, I also don't think it's the
      # end of the world.
      def included(klass)
        if klass.const_defined?(:ClassMethods, false)
          klass.const_get(:ClassMethods, false).send(:include, const_get(:ClassMethods))
        else
          klass.send(:extend, const_get(:ClassMethods))
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ihoka-friendly-0.8.0.pre lib/friendly/document/mixin.rb
ihoka-friendly-0.7.1.2 lib/friendly/document/mixin.rb
ihoka-friendly-0.7.1.1 lib/friendly/document/mixin.rb
ihoka-friendly-0.7.1 lib/friendly/document/mixin.rb
ihoka-friendly-0.7.0 lib/friendly/document/mixin.rb