Method: Aruba::Runtime#initialize
- Defined in:
- lib/aruba/runtime.rb
#initialize(opts = {}) ⇒ Runtime
Returns a new instance of Runtime.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/aruba/runtime.rb', line 44 def initialize(opts = {}) @event_bus = EventBus.new(Aruba::Events.registry) @announcer = opts.fetch(:announcer, Aruba.platform.announcer.new) @config = opts.fetch(:config, ConfigWrapper.new(Aruba.config.make_copy, @event_bus)) @environment = opts.fetch(:environment, Aruba.platform.environment_variables.new) @current_directory = ArubaPath.new(@config.working_directory) @root_directory = ArubaPath.new(@config.root_directory) @environment.update(@config.command_runtime_environment) @command_monitor = opts.fetch(:command_monitor, Aruba.platform.command_monitor.new(announcer: @announcer)) @logger = opts.fetch(:logger, Aruba.platform.logger.new) @logger.mode = @config.log_level @setup_done = false end |