lib/cryptum.rb in cryptum-0.0.381 vs lib/cryptum.rb in cryptum-0.0.382

- old
+ new

@@ -2,21 +2,19 @@ require 'rbtrace' require 'yaml' require 'json' require 'fileutils' -require 'tty-spinner' # Root-Level Namespace for cryptum module Cryptum $stdout.sync = true $stdout.flush require 'cryptum/api' require 'cryptum/bot_conf' require 'cryptum/event' require 'cryptum/log' - require 'cryptum/matrix' require 'cryptum/open_ai' require 'cryptum/option' require 'cryptum/order_book' require 'cryptum/portfolio' require 'cryptum/ui' @@ -80,38 +78,9 @@ # Exit Gracefully if CTRL+C is Pressed During Session Cryptum.exit_gracefully(which_self: self) rescue StandardError => e # Produce a Stacktrace for anything else Curses.close_screen - raise e - end - - public_class_method def self.exit_gracefully(opts = {}) - which_self = opts[:which_self] - event_history = opts[:event_history] - # option_choice = opts[:option_choice] - # env = opts[:env] - - # Clear out candle data to ensure - # Cryptum Statistics Only Apply to - # Live Sessions - if event_history - File.write( - order_book_file, - JSON.pretty_generate(event_history.order_book) - ) - end - - Curses.close_screen - puts "Interrupt detected in #{which_self}...goodbye." - - exit 0 - rescue NameError - puts "\nInterrupt detected in #{which_self}...goodbye." - - exit 0 - rescue StandardError => e - # Produce a Stacktrace for anything else raise e end public_class_method def self.help constants.sort