diff options
author | icebaker <icebaker@proton.me> | 2023-05-11 19:24:50 -0300 |
---|---|---|
committer | icebaker <icebaker@proton.me> | 2023-05-11 19:24:50 -0300 |
commit | ec5e25547a401141586c87621266f9cd68c59e3c (patch) | |
tree | 547b3c7fa04c9e695785b9beeda0be5a4a77b006 /ports |
first commit
Diffstat (limited to 'ports')
-rw-r--r-- | ports/dsl/nano-bots.rb | 25 | ||||
-rw-r--r-- | ports/dsl/nano-bots/cli.rb | 5 |
2 files changed, 30 insertions, 0 deletions
diff --git a/ports/dsl/nano-bots.rb b/ports/dsl/nano-bots.rb new file mode 100644 index 0000000..bce169c --- /dev/null +++ b/ports/dsl/nano-bots.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +require 'dotenv/load' + +require_relative '../../static/gem' +require_relative '../../controllers/instance' +require_relative '../../controllers/interfaces/cli' + +module NanoBot + def self.new(cartridge:, state: '-') + Controllers::Instance.new(cartridge_path: cartridge, state:) + end + + def self.cli + Controllers::Interfaces::CLI.handle! + end + + def self.repl(cartridge:, state: '-') + Controllers::Instance.new(cartridge_path: cartridge, state:).repl + end + + def self.version + NanoBot::GEM[:version] + end +end diff --git a/ports/dsl/nano-bots/cli.rb b/ports/dsl/nano-bots/cli.rb new file mode 100644 index 0000000..3212db6 --- /dev/null +++ b/ports/dsl/nano-bots/cli.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +require 'nano-bots' + +NanoBot.cli |