Class: Rohbau::RuntimeLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/rohbau/runtime_loader.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

.registrarObject

Returns the value of attribute registrar.



17
18
19
# File 'lib/rohbau/runtime_loader.rb', line 17

def registrar
  @registrar
end

Class Method Details

.instanceObject



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

Returns:

  • (Boolean)


8
9
10
# File 'lib/rohbau/runtime_loader.rb', line 8

def running?
  !!instance
end

.terminateObject



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