module Eggshell::Bundles::Bundle

Helper module that automatically registers the bundle class extending it.

Public Class Methods

included(clazz) click to toggle source
# File lib/eggshell/bundles.rb, line 13
def self.included(clazz)
        id = nil
        if defined?(clazz::BUNDLE_ID)
                id = clazz::BUNDLE_ID
        else
                id = clazz.to_s.gsub('::', '_').downcase
        end
        Registry.register_bundle(clazz, id)
end