diff options
Diffstat (limited to 'controllers/interfaces/eval.rb')
-rw-r--r-- | controllers/interfaces/eval.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/controllers/interfaces/eval.rb b/controllers/interfaces/eval.rb index 6cb12b4..af519ab 100644 --- a/controllers/interfaces/eval.rb +++ b/controllers/interfaces/eval.rb @@ -21,14 +21,16 @@ module NanoBot end def self.build_prefix(cartridge) - eval_interface = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces eval]) + eval_interface = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces eval]) return nil if eval_interface.nil? + eval_interface[:prefix] end def self.build_postfix(cartridge) - eval_interface = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces eval]) + eval_interface = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces eval]) return "\n" if eval_interface.nil? || !eval_interface.key?(:postfix) # default + eval_interface[:postfix] end end |