summaryrefslogtreecommitdiff
path: root/controllers/instance.rb
diff options
context:
space:
mode:
Diffstat (limited to 'controllers/instance.rb')
-rw-r--r--controllers/instance.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/controllers/instance.rb b/controllers/instance.rb
index a982261..d4e0c1b 100644
--- a/controllers/instance.rb
+++ b/controllers/instance.rb
@@ -13,14 +13,16 @@ require_relative './session'
module NanoBot
module Controllers
class Instance
- def initialize(cartridge_path:, stream:, state: nil)
+ def initialize(cartridge_path:, stream:, state: nil, environment: {})
@stream = stream
load_cartridge!(cartridge_path)
- provider = Components::Provider.new(@cartridge[:provider])
+ provider = Components::Provider.new(@cartridge[:provider], environment:)
- @session = Session.new(provider:, cartridge: @cartridge, state:, stream: @stream)
+ @session = Session.new(
+ provider:, cartridge: @cartridge, state:, stream: @stream, environment:
+ )
end
def cartridge