Class: Rohbau::RuntimeLoader
- Inherits:
-
Object
- Object
- Rohbau::RuntimeLoader
- Defined in:
- lib/rohbau/runtime_loader.rb
Class Attribute Summary collapse
-
.registrar ⇒ Object
Returns the value of attribute registrar.
Class Method Summary collapse
- .instance ⇒ Object
- .new(*args) ⇒ Object
- .registered(registrar) ⇒ Object
- .running? ⇒ Boolean
- .terminate ⇒ Object
Instance Method Summary collapse
-
#initialize(runtime) ⇒ RuntimeLoader
constructor
A new instance of RuntimeLoader.
Constructor Details
#initialize(runtime) ⇒ RuntimeLoader
Returns a new instance of RuntimeLoader.
29 30 31 32 |
# File 'lib/rohbau/runtime_loader.rb', line 29 def initialize(runtime) return if singleton_assigned? build_singleton(runtime) end |
Class Attribute Details
.registrar ⇒ Object
Returns the value of attribute registrar.
17 18 19 |
# File 'lib/rohbau/runtime_loader.rb', line 17 def registrar @registrar end |
Class Method Details
.instance ⇒ Object
4 5 6 |
# File 'lib/rohbau/runtime_loader.rb', line 4 def instance @instance end |
.new(*args) ⇒ Object
23 24 25 26 |
# File 'lib/rohbau/runtime_loader.rb', line 23 def new(*args) super(*args) self end |
.registered(registrar) ⇒ Object
19 20 21 |
# File 'lib/rohbau/runtime_loader.rb', line 19 def registered(registrar) self.registrar = registrar end |
.running? ⇒ Boolean
8 9 10 |
# File 'lib/rohbau/runtime_loader.rb', line 8 def running? !!instance end |
.terminate ⇒ Object
12 13 14 15 |
# File 'lib/rohbau/runtime_loader.rb', line 12 def terminate instance.terminate if instance.respond_to? :terminate remove_instance_variable :@instance if defined? @instance end |