Sha256: 05cae090d5e701f5205e456d7f72b726baa2bc4c58d1e5cebc3f08378a8341a9

Contents?: true

Size: 625 Bytes

Versions: 2

Compression:

Stored size: 625 Bytes

Contents

require 'active_support/dependency_module'

module ActiveSupport
  module Concern
    include DependencyModule

    def append_features(base)
      if super
        base.extend const_get("ClassMethods") if const_defined?("ClassMethods")
        base.send :include, const_get("InstanceMethods") if const_defined?("InstanceMethods")
        base.class_eval(&@_included_block) if instance_variable_defined?("@_included_block")
      end
    end

    def included(base = nil, &block)
      if base.nil?
        @_included_block = block
      else
        super
      end
    end

    alias_method :include, :depends_on
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
cassandra_object-0.6.0.pre vendor/activesupport/lib/active_support/concern.rb
recliner-0.0.1 vendor/activesupport/lib/active_support/concern.rb