Module: Eggshell::Bundles::Bundle

Included in:
Basic, Basics, Loader
Defined in:
lib/eggshell/bundles.rb

Overview

Helper module that automatically registers the bundle class extending it.

Class Method Summary collapse

Class Method Details

.included(clazz) ⇒ Object



13
14
15
16
17
18
19
20
21
# 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