Class: Houston::Module
- Inherits:
-
Object
- Object
- Houston::Module
- Defined in:
- lib/houston/boot/configuration.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #accepts_configuration? ⇒ Boolean
- #dependencies ⇒ Object
- #engine ⇒ Object
-
#initialize(module_name) ⇒ Module
constructor
A new instance of Module.
- #load_configuration(moduleconfig) ⇒ Object
- #namespace ⇒ Object
- #path ⇒ Object
Constructor Details
#initialize(module_name) ⇒ Module
Returns a new instance of Module.
386 387 388 |
# File 'lib/houston/boot/configuration.rb', line 386 def initialize(module_name) @name = module_name.to_s end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
384 385 386 |
# File 'lib/houston/boot/configuration.rb', line 384 def name @name end |
Instance Method Details
#accepts_configuration? ⇒ Boolean
390 391 392 |
# File 'lib/houston/boot/configuration.rb', line 390 def accepts_configuration? namespace.respond_to?(:config) end |
#dependencies ⇒ Object
398 399 400 |
# File 'lib/houston/boot/configuration.rb', line 398 def dependencies namespace.respond_to?(:dependencies) ? namespace.dependencies : [] end |
#engine ⇒ Object
402 403 404 |
# File 'lib/houston/boot/configuration.rb', line 402 def engine namespace::Engine end |
#load_configuration(moduleconfig) ⇒ Object
394 395 396 |
# File 'lib/houston/boot/configuration.rb', line 394 def load_configuration(moduleconfig) namespace.config(&moduleconfig) end |
#namespace ⇒ Object
410 411 412 |
# File 'lib/houston/boot/configuration.rb', line 410 def namespace @namespace ||= "houston/#{name}".camelize.constantize end |
#path ⇒ Object
406 407 408 |
# File 'lib/houston/boot/configuration.rb', line 406 def path "/#{name}" end |