Module: Jets::Rails
- Defined in:
- lib/jets/rails.rb,
lib/jets/rails/railtie.rb,
lib/jets/rails/version.rb
Overview
Initializer interface
Defined Under Namespace
Classes: Railtie
Constant Summary collapse
- VERSION =
"0.1.3"
Class Method Summary collapse
- ._container_blocks ⇒ Object private
-
.container(&block) ⇒ self
Set container block that will be evaluated in the context of the container.
-
.create_container(options = {}) ⇒ Class
private
Create a new container class.
- .evaluate_initializer(container) ⇒ Object private
Class Method Details
._container_blocks ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
51 52 53 |
# File 'lib/jets/rails.rb', line 51 def self._container_blocks @_container_blocks ||= [] end |
.container(&block) ⇒ self
Set container block that will be evaluated in the context of the container
25 26 27 28 |
# File 'lib/jets/rails.rb', line 25 def self.container(&block) _container_blocks << block self end |
.create_container(options = {}) ⇒ Class
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create a new container class
This is used during booting and reloading
39 40 41 |
# File 'lib/jets/rails.rb', line 39 def self.create_container( = {}) Class.new(Container) { config.update() } end |
.evaluate_initializer(container) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 47 48 |
# File 'lib/jets/rails.rb', line 44 def self.evaluate_initializer(container) _container_blocks.each do |block| container.class_eval(&block) end end |