diff options
Diffstat (limited to 'ports/dsl/nano-bots.rb')
-rw-r--r-- | ports/dsl/nano-bots.rb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ports/dsl/nano-bots.rb b/ports/dsl/nano-bots.rb index 89da466..cbfe7f9 100644 --- a/ports/dsl/nano-bots.rb +++ b/ports/dsl/nano-bots.rb @@ -9,8 +9,13 @@ require_relative '../../controllers/interfaces/cli' require_relative '../../components/stream' module NanoBot - def self.new(cartridge: '-', state: '-') - Controllers::Instance.new(cartridge_path: cartridge, state:, stream: Components::Stream.new) + def self.new(cartridge: '-', state: '-', environment: {}) + Controllers::Instance.new( + cartridge_path: cartridge, + state:, + stream: Components::Stream.new, + environment: + ) end def self.cartridges @@ -21,8 +26,10 @@ module NanoBot Controllers::Interfaces::CLI.handle! end - def self.repl(cartridge: '-', state: '-') - Controllers::Instance.new(cartridge_path: cartridge, state:, stream: $stdout).repl + def self.repl(cartridge: '-', state: '-', environment: {}) + Controllers::Instance.new( + cartridge_path: cartridge, state:, stream: $stdout, environment: + ).repl end def self.version |