Class: Hoth::Modules
Instance Attribute Summary collapse
-
#service_modules ⇒ Object
readonly
Returns the value of attribute service_modules.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#service_modules ⇒ Object (readonly)
Returns the value of attribute service_modules.
5 6 7 |
# File 'lib/hoth/modules.rb', line 5 def service_modules @service_modules end |
Class Method Details
.define(&block) ⇒ Object
7 8 9 |
# File 'lib/hoth/modules.rb', line 7 def self.define(&block) instance.instance_eval(&block) end |
.module(module_name) ⇒ Object
11 12 13 |
# File 'lib/hoth/modules.rb', line 11 def self.module(module_name) instance.service_modules[module_name] end |
Instance Method Details
#service_module(module_name, &block) ⇒ Object
15 16 17 18 19 |
# File 'lib/hoth/modules.rb', line 15 def service_module(module_name, &block) service_module = ServiceModule.new(:name => module_name) service_module.instance_eval(&block) @service_modules[module_name] = service_module end |