Class: ProxyRb::Runtime
- Inherits:
-
Object
- Object
- ProxyRb::Runtime
- Defined in:
- lib/proxy_rb/runtime.rb
Overview
Runtime of proxy_rb
Most methods are considered private. Please look for ‘(private)` in the attribute descriptions. Only a few like `#current_directory`, ’#root_directory` and ‘#config` are considered to be part of the public API.
Instance Attribute Summary collapse
-
#announcer ⇒ Object
Announce information.
-
#config ⇒ Object
Access configuration of proxy_rb.
-
#event_bus ⇒ Object
Handle events (private).
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Runtime
constructor
A new instance of Runtime.
-
#setup_already_done? ⇒ Boolean
Has proxy_rb already been setup.
-
#setup_done ⇒ Object
Setup of proxy_rb is finshed.
Constructor Details
#initialize(opts = {}) ⇒ Runtime
Returns a new instance of Runtime.
27 28 29 30 31 32 33 |
# File 'lib/proxy_rb/runtime.rb', line 27 def initialize(opts = {}) @event_bus = EventBus.new(EventBus::NameResolver.new(ProxyRb::Events)) @announcer = opts.fetch(:announcer, ProxyRb::Announcer.new) @config = opts.fetch(:config, ConfigurationWrapper.new(ProxyRb.config.make_copy, @event_bus)) @setup_done = false end |
Instance Attribute Details
#announcer ⇒ Object
Announce information
25 |
# File 'lib/proxy_rb/runtime.rb', line 25 attr_accessor :config, :announcer, :event_bus |
#config ⇒ Object
Access configuration of proxy_rb
25 26 27 |
# File 'lib/proxy_rb/runtime.rb', line 25 def config @config end |
#event_bus ⇒ Object
Handle events (private)
25 |
# File 'lib/proxy_rb/runtime.rb', line 25 attr_accessor :config, :announcer, :event_bus |
Instance Method Details
#setup_already_done? ⇒ Boolean
Has proxy_rb already been setup. Should be used only internally.
45 46 47 |
# File 'lib/proxy_rb/runtime.rb', line 45 def setup_already_done? @setup_done == true end |
#setup_done ⇒ Object
Setup of proxy_rb is finshed. Should be used only internally.
38 39 40 |
# File 'lib/proxy_rb/runtime.rb', line 38 def setup_done @setup_done = true end |