Sha256: 336d847b24942822769483fbfcb1930ae506e93433749ceffa002ed5d4c45798
Contents?: true
Size: 856 Bytes
Versions: 104
Compression:
Stored size: 856 Bytes
Contents
# frozen_string_literal: true module Cryptum # This plugin is used to Write the Order Book from Memory # to File When the "w" Key is Pressed module Event module OrderBook # Supported Method Parameters:: # Cryptum::Event::BotConf.write( # ) public_class_method def self.write(opts = {}) terminal_win = opts[:terminal_win] event_history = opts[:event_history] terminal_win.key_press_event.key_w = false order_book_file = event_history.order_book[:path] File.write( order_book_file, JSON.pretty_generate(event_history.order_book) ) rescue StandardError => e raise e end # Display Usage for this Module public_class_method def self.help puts "USAGE: #{self}.write() " end end end end
Version data entries
104 entries across 104 versions & 1 rubygems