Sha256: 49716190bfebb51393a32d535ae8f90d4084f92e4e49a1f8c6b06c6b72d38118

Contents?: true

Size: 410 Bytes

Versions: 10

Compression:

Stored size: 410 Bytes

Contents

require "sapience"

module Sneakers
  module Worker
    def self.descendants # :nodoc:
      descendants = []
      ObjectSpace.each_object(singleton_class) do |k|
        descendants.unshift k unless k == self
      end
      descendants
    end
  end
end

module Sapience
  module Sneakers
    ::Sneakers::Worker.descendants.each do |worker|
      worker.send(:include, Sapience::Loggable)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sapience-0.2.2 lib/sapience/sneakers.rb
sapience-0.2.1 lib/sapience/sneakers.rb
sapience-0.2.0 lib/sapience/sneakers.rb
sapience-0.1.13 lib/sapience/sneakers.rb
sapience-0.1.12 lib/sapience/sneakers.rb
sapience-0.1.11 lib/sapience/sneakers.rb
sapience-0.1.10 lib/sapience/sneakers.rb
sapience-0.1.9 lib/sapience/sneakers.rb
sapience-0.1.8 lib/sapience/sneakers.rb
sapience-0.1.7 lib/sapience/sneakers.rb