Sha256: 2abf4aec48c5a0782f2a451e907570b6d7cfeb90a761e6934df8bb0764fd0194

Contents?: true

Size: 911 Bytes

Versions: 17

Compression:

Stored size: 911 Bytes

Contents

module Feature
  module ClassMethods
    def feature
    end
  end

  # in uber, this would look somehow like
  # module Feature
  #   module ClassMethods ... end

  #   extend Uber::InheritableIncluded
  #   inheritable_included do |includer|
  #     includer.extend ClassMethods
  #   end
  # end

  InheritedIncludedCodeBlock = lambda do |includer|
    includer.extend ClassMethods
  end

  module RecursiveIncluded
    def included(includer)
      #super # TODO: test me.
      puts "RecursiveIncluded in #{includer}"

      includer.module_eval do
        InheritedIncludedCodeBlock.call(includer)
        extend RecursiveIncluded
      end
    end
  end
  extend RecursiveIncluded
end

module Client
  include Feature
end

module Extension
  include Client
end

module Plugin
  include Extension
end

module Framework
  include Plugin
end

Client.feature
Extension.feature
Plugin.feature
Framework.feature

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/uber-0.1.0/test/zeugs.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/uber-0.1.0/test/zeugs.rb
uber-0.1.0 test/zeugs.rb
uber-0.0.15 test/zeugs.rb
uber-0.0.14 test/zeugs.rb
uber-0.0.13 test/zeugs.rb
uber-0.0.12 test/zeugs.rb
uber-0.0.11 test/zeugs.rb
uber-0.0.10 test/zeugs.rb
uber-0.0.9 test/zeugs.rb
uber-0.0.8 test/zeugs.rb
uber-0.0.7 test/zeugs.rb
uber-0.0.6 test/zeugs.rb
uber-0.0.5 test/zeugs.rb
uber-0.0.4 test/zeugs.rb
uber-0.0.3 test/zeugs.rb
uber-0.0.2 test/zeugs.rb