diff options
author | icebaker <icebaker@proton.me> | 2024-01-08 21:41:30 -0300 |
---|---|---|
committer | icebaker <icebaker@proton.me> | 2024-01-08 21:41:30 -0300 |
commit | 31e53046bd35b83027f8a8e1ab99a6eceb4e6a3c (patch) | |
tree | d13179fb7eb91db4e70a97c96f24889b3153c451 /controllers/instance.rb | |
parent | 819381e7bd3e3ca5d310ad0a29b6925dcfa26720 (diff) |
adding support to markdown cartridges
Diffstat (limited to 'controllers/instance.rb')
-rw-r--r-- | controllers/instance.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/controllers/instance.rb b/controllers/instance.rb index 259a548..85b97ec 100644 --- a/controllers/instance.rb +++ b/controllers/instance.rb @@ -1,11 +1,10 @@ # frozen_string_literal: true -require 'yaml' - require_relative '../logic/helpers/hash' require_relative '../components/provider' require_relative '../components/storage' require_relative '../components/stream' +require_relative 'cartridges' require_relative 'interfaces/repl' require_relative 'interfaces/eval' require_relative 'session' @@ -83,13 +82,11 @@ module NanoBot raise StandardError, "Cartridge file not found: \"#{path}\"" end - @cartridge = YAML.safe_load_file(elected_path, permitted_classes: [Symbol]) + @cartridge = Cartridges.load(elected_path) end @safe_cartridge = Marshal.load(Marshal.dump(@cartridge)) - @cartridge = Logic::Helpers::Hash.symbolize_keys(@cartridge) - inject_environment_variables!(@cartridge) end |