diff options
author | icebaker <icebaker@proton.me> | 2023-05-12 19:39:51 -0300 |
---|---|---|
committer | icebaker <icebaker@proton.me> | 2023-05-12 19:39:51 -0300 |
commit | 805e5073117bc717f46da0fa7f8ab628b4fa2a7d (patch) | |
tree | 3d81ecc064759924da0c89beb2c141764bb50642 /controllers/interfaces/repl.rb | |
parent | 6e0576072a83c41992d61a5d93533087adb2743d (diff) |
bump to 0.0.2
Diffstat (limited to 'controllers/interfaces/repl.rb')
-rw-r--r-- | controllers/interfaces/repl.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/controllers/interfaces/repl.rb b/controllers/interfaces/repl.rb index 5477c33..9415674 100644 --- a/controllers/interfaces/repl.rb +++ b/controllers/interfaces/repl.rb @@ -40,14 +40,16 @@ module NanoBot end def self.build_prefix(cartridge) - repl = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces repl]) + repl = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces repl]) return "\n" if repl.nil? || !repl.key?(:prefix) # default + repl[:prefix] end def self.build_postfix(cartridge) - repl = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces repl]) + repl = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces repl]) return "\n" if repl.nil? || !repl.key?(:postfix) # default + repl[:postfix] end @@ -63,9 +65,9 @@ module NanoBot end end elsif prompt.is_a?(String) - result = prompt + result = prompt else - result = '🤖' + Rainbow('> ').blue + result = "🤖#{Rainbow('> ').blue}" end result |