cryptum 0.0.380 → 0.0.382
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/.rubocop_todo.yml +3 -8
- data/Gemfile +1 -2
- data/bin/cryptum +3 -3
- data/bin/cryptum-forecast +3 -3
- data/lib/cryptum/api/exchange_rates.rb +42 -0
- data/lib/cryptum/api/fees.rb +36 -0
- data/lib/cryptum/api/order_history.rb +56 -0
- data/lib/cryptum/api/orders.rb +261 -0
- data/lib/cryptum/api/portfolio.rb +79 -0
- data/lib/cryptum/api/products.rb +65 -0
- data/lib/cryptum/api/rest.rb +177 -0
- data/lib/cryptum/api/signature.rb +79 -0
- data/lib/cryptum/api.rb +9 -692
- data/lib/cryptum/bot_conf.rb +14 -3
- data/lib/cryptum/event/buy.rb +1 -1
- data/lib/cryptum/event/cancel.rb +1 -1
- data/lib/cryptum/event/exit.rb +1 -1
- data/lib/cryptum/event/gtfo.rb +1 -1
- data/lib/cryptum/event/history.rb +4 -1
- data/lib/cryptum/event/parse.rb +1 -1
- data/lib/cryptum/event/sell.rb +1 -1
- data/lib/cryptum/option/choice.rb +1 -1
- data/lib/cryptum/order_book/generate.rb +4 -5
- data/lib/cryptum/portfolio/balance.rb +3 -5
- data/lib/cryptum/ui/command.rb +1 -1
- data/lib/cryptum/ui/exit.rb +43 -0
- data/lib/cryptum/ui/key_press_event.rb +1 -1
- data/lib/cryptum/ui/market_trend.rb +4 -1
- data/lib/cryptum/ui/matrix.rb +187 -0
- data/lib/cryptum/ui/order_execute_details.rb +4 -1
- data/lib/cryptum/ui/order_execution.rb +8 -3
- data/lib/cryptum/ui/order_plan.rb +6 -2
- data/lib/cryptum/ui/order_plan_details.rb +4 -1
- data/lib/cryptum/ui/order_timer.rb +5 -1
- data/lib/cryptum/ui/portfolio.rb +5 -1
- data/lib/cryptum/ui/signal_engine.rb +1 -1
- data/lib/cryptum/ui/terminal_window.rb +1 -1
- data/lib/cryptum/ui/ticker.rb +4 -1
- data/lib/cryptum/ui.rb +19 -17
- data/lib/cryptum/version.rb +1 -1
- data/lib/cryptum/web_sock/coinbase.rb +2 -2
- data/lib/cryptum/web_sock/event_machine.rb +1 -1
- data/lib/cryptum.rb +0 -31
- data/spec/lib/cryptum/api/exchange_rates_spec.rb +10 -0
- data/spec/lib/cryptum/api/fees_spec.rb +10 -0
- data/spec/lib/cryptum/api/order_history_spec.rb +10 -0
- data/spec/lib/cryptum/api/orders_spec.rb +10 -0
- data/spec/lib/cryptum/api/portfolio_spec.rb +10 -0
- data/spec/lib/cryptum/api/products_spec.rb +10 -0
- data/spec/lib/cryptum/api/rest_spec.rb +10 -0
- data/spec/lib/cryptum/api/signature_spec.rb +10 -0
- data/spec/lib/cryptum/{matrix_spec.rb → ui/exit_spec.rb} +2 -2
- data/spec/lib/cryptum/ui/matrix_spec.rb +10 -0
- metadata +24 -20
- data/lib/cryptum/matrix.rb +0 -181
data/lib/cryptum/ui.rb
CHANGED
@@ -7,18 +7,20 @@ module Cryptum
|
|
7
7
|
# Cryptum::UI Module used for Presenting the
|
8
8
|
# Cryptum Curses Interface
|
9
9
|
module UI
|
10
|
+
require 'cryptum/ui/command'
|
11
|
+
require 'cryptum/ui/exit'
|
10
12
|
require 'cryptum/ui/key_press_event'
|
11
|
-
require 'cryptum/ui/
|
12
|
-
require 'cryptum/ui/
|
13
|
-
require 'cryptum/ui/
|
13
|
+
require 'cryptum/ui/market_trend'
|
14
|
+
require 'cryptum/ui/matrix'
|
15
|
+
require 'cryptum/ui/order_execution'
|
16
|
+
require 'cryptum/ui/order_execute_details'
|
14
17
|
require 'cryptum/ui/order_plan'
|
15
18
|
require 'cryptum/ui/order_plan_details'
|
16
19
|
require 'cryptum/ui/order_timer'
|
17
|
-
require 'cryptum/ui/
|
20
|
+
require 'cryptum/ui/portfolio'
|
18
21
|
require 'cryptum/ui/signal_engine'
|
19
|
-
require 'cryptum/ui/
|
20
|
-
require 'cryptum/ui/
|
21
|
-
require 'cryptum/ui/command'
|
22
|
+
require 'cryptum/ui/terminal_window'
|
23
|
+
require 'cryptum/ui/ticker'
|
22
24
|
|
23
25
|
# Initialize the UI
|
24
26
|
public_class_method def self.init
|
@@ -53,7 +55,7 @@ module Cryptum
|
|
53
55
|
Cryptum::UI::TerminalWindow.new
|
54
56
|
rescue Interrupt
|
55
57
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
56
|
-
Cryptum.
|
58
|
+
Cryptum::UI::Exit.gracefully(which_self: self)
|
57
59
|
rescue StandardError => e
|
58
60
|
# Produce a Stacktrace for anything else
|
59
61
|
Curses.close_screen
|
@@ -78,7 +80,7 @@ module Cryptum
|
|
78
80
|
window
|
79
81
|
rescue Interrupt
|
80
82
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
81
|
-
Cryptum.
|
83
|
+
Cryptum::UI::Exit.gracefully(which_self: self)
|
82
84
|
rescue StandardError => e
|
83
85
|
# Produce a Stacktrace for anything else
|
84
86
|
Curses.close_screen
|
@@ -104,7 +106,7 @@ module Cryptum
|
|
104
106
|
)
|
105
107
|
rescue Interrupt
|
106
108
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
107
|
-
Cryptum.
|
109
|
+
Cryptum::UI::Exit.gracefully(which_self: self)
|
108
110
|
rescue StandardError => e
|
109
111
|
# Produce a Stacktrace for anything else
|
110
112
|
Curses.close_screen
|
@@ -202,7 +204,7 @@ module Cryptum
|
|
202
204
|
end
|
203
205
|
rescue Interrupt
|
204
206
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
205
|
-
Cryptum.
|
207
|
+
Cryptum::UI::Exit.gracefully(which_self: self)
|
206
208
|
rescue StandardError => e
|
207
209
|
# Produce a Stacktrace for anything else
|
208
210
|
Curses.close_screen
|
@@ -217,7 +219,7 @@ module Cryptum
|
|
217
219
|
(Curses.cols / 2) - str_divided_by_two
|
218
220
|
rescue Interrupt
|
219
221
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
220
|
-
Cryptum.
|
222
|
+
Cryptum::UI::Exit.gracefully(which_self: self)
|
221
223
|
rescue StandardError => e
|
222
224
|
# Produce a Stacktrace for anything else
|
223
225
|
Curses.close_screen
|
@@ -228,7 +230,7 @@ module Cryptum
|
|
228
230
|
0
|
229
231
|
rescue Interrupt
|
230
232
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
231
|
-
Cryptum.
|
233
|
+
Cryptum::UI::Exit.gracefully(which_self: self)
|
232
234
|
rescue StandardError => e
|
233
235
|
# Produce a Stacktrace for anything else
|
234
236
|
Curses.close_screen
|
@@ -240,7 +242,7 @@ module Cryptum
|
|
240
242
|
(Curses.cols / 8) + 5
|
241
243
|
rescue Interrupt
|
242
244
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
243
|
-
Cryptum.
|
245
|
+
Cryptum::UI::Exit.gracefully(which_self: self)
|
244
246
|
rescue StandardError => e
|
245
247
|
# Produce a Stacktrace for anything else
|
246
248
|
Curses.close_screen
|
@@ -252,7 +254,7 @@ module Cryptum
|
|
252
254
|
((Curses.cols / 8) * 3) + 2
|
253
255
|
rescue Interrupt
|
254
256
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
255
|
-
Cryptum.
|
257
|
+
Cryptum::UI::Exit.gracefully(which_self: self)
|
256
258
|
rescue StandardError => e
|
257
259
|
# Produce a Stacktrace for anything else
|
258
260
|
Curses.close_screen
|
@@ -264,7 +266,7 @@ module Cryptum
|
|
264
266
|
((Curses.cols / 4) * 3) - 3
|
265
267
|
rescue Interrupt
|
266
268
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
267
|
-
Cryptum.
|
269
|
+
Cryptum::UI::Exit.gracefully(which_self: self)
|
268
270
|
rescue StandardError => e
|
269
271
|
# Produce a Stacktrace for anything else
|
270
272
|
Curses.close_screen
|
@@ -327,7 +329,7 @@ module Cryptum
|
|
327
329
|
key_press_event
|
328
330
|
rescue Interrupt
|
329
331
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
330
|
-
Cryptum.
|
332
|
+
Cryptum::UI::Exit.gracefully(which_self: self)
|
331
333
|
rescue StandardError => e
|
332
334
|
# Produce a Stacktrace for anything else
|
333
335
|
Curses.close_screen
|
data/lib/cryptum/version.rb
CHANGED
@@ -54,7 +54,7 @@ module Cryptum
|
|
54
54
|
ws
|
55
55
|
rescue Interrupt
|
56
56
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
57
|
-
Cryptum.
|
57
|
+
Cryptum::UI::Exit.gracefully(which_self: self)
|
58
58
|
rescue StandardError => e
|
59
59
|
raise e
|
60
60
|
end
|
@@ -65,7 +65,7 @@ module Cryptum
|
|
65
65
|
product_id = option_choice.symbol.to_s.gsub('_', '-').upcase
|
66
66
|
|
67
67
|
api_secret = env[:api_secret]
|
68
|
-
api_signature_response = Cryptum::API.
|
68
|
+
api_signature_response = Cryptum::API::Signature.generate(
|
69
69
|
api_secret: api_secret
|
70
70
|
)
|
71
71
|
api_key = env[:api_key]
|
@@ -255,7 +255,7 @@ module Cryptum
|
|
255
255
|
end
|
256
256
|
rescue Interrupt
|
257
257
|
# Exit Gracefully if CTRL+C is Pressed During Session
|
258
|
-
Cryptum.
|
258
|
+
Cryptum::UI::Exit.gracefully(
|
259
259
|
which_self: self,
|
260
260
|
event_history: event_history,
|
261
261
|
option_choice: option_choice,
|
data/lib/cryptum.rb
CHANGED
@@ -4,7 +4,6 @@ require 'rbtrace'
|
|
4
4
|
require 'yaml'
|
5
5
|
require 'json'
|
6
6
|
require 'fileutils'
|
7
|
-
require 'tty-spinner'
|
8
7
|
# Root-Level Namespace for cryptum
|
9
8
|
module Cryptum
|
10
9
|
$stdout.sync = true
|
@@ -14,7 +13,6 @@ module Cryptum
|
|
14
13
|
require 'cryptum/bot_conf'
|
15
14
|
require 'cryptum/event'
|
16
15
|
require 'cryptum/log'
|
17
|
-
require 'cryptum/matrix'
|
18
16
|
require 'cryptum/open_ai'
|
19
17
|
require 'cryptum/option'
|
20
18
|
require 'cryptum/order_book'
|
@@ -85,35 +83,6 @@ module Cryptum
|
|
85
83
|
raise e
|
86
84
|
end
|
87
85
|
|
88
|
-
public_class_method def self.exit_gracefully(opts = {})
|
89
|
-
which_self = opts[:which_self]
|
90
|
-
event_history = opts[:event_history]
|
91
|
-
# option_choice = opts[:option_choice]
|
92
|
-
# env = opts[:env]
|
93
|
-
|
94
|
-
# Clear out candle data to ensure
|
95
|
-
# Cryptum Statistics Only Apply to
|
96
|
-
# Live Sessions
|
97
|
-
if event_history
|
98
|
-
File.write(
|
99
|
-
order_book_file,
|
100
|
-
JSON.pretty_generate(event_history.order_book)
|
101
|
-
)
|
102
|
-
end
|
103
|
-
|
104
|
-
Curses.close_screen
|
105
|
-
puts "Interrupt detected in #{which_self}...goodbye."
|
106
|
-
|
107
|
-
exit 0
|
108
|
-
rescue NameError
|
109
|
-
puts "\nInterrupt detected in #{which_self}...goodbye."
|
110
|
-
|
111
|
-
exit 0
|
112
|
-
rescue StandardError => e
|
113
|
-
# Produce a Stacktrace for anything else
|
114
|
-
raise e
|
115
|
-
end
|
116
|
-
|
117
86
|
public_class_method def self.help
|
118
87
|
constants.sort
|
119
88
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Cryptum::API::ExchangeRates do
|
6
|
+
it 'should display information for existing help method' do
|
7
|
+
help_response = Cryptum::API::ExchangeRates
|
8
|
+
expect(help_response).to respond_to :help
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Cryptum::API::OrderHistory do
|
6
|
+
it 'should display information for existing help method' do
|
7
|
+
help_response = Cryptum::API::OrderHistory
|
8
|
+
expect(help_response).to respond_to :help
|
9
|
+
end
|
10
|
+
end
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
describe Cryptum::
|
5
|
+
describe Cryptum::UI::Exit do
|
6
6
|
it 'should display information for existing help method' do
|
7
|
-
help_response = Cryptum::
|
7
|
+
help_response = Cryptum::UI::Exit
|
8
8
|
expect(help_response).to respond_to :help
|
9
9
|
end
|
10
10
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cryptum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.382
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -310,14 +310,14 @@ dependencies:
|
|
310
310
|
requirements:
|
311
311
|
- - '='
|
312
312
|
- !ruby/object:Gem::Version
|
313
|
-
version: 1.8.
|
313
|
+
version: 1.8.2
|
314
314
|
type: :runtime
|
315
315
|
prerelease: false
|
316
316
|
version_requirements: !ruby/object:Gem::Requirement
|
317
317
|
requirements:
|
318
318
|
- - '='
|
319
319
|
- !ruby/object:Gem::Version
|
320
|
-
version: 1.8.
|
320
|
+
version: 1.8.2
|
321
321
|
- !ruby/object:Gem::Dependency
|
322
322
|
name: tty-prompt
|
323
323
|
requirement: !ruby/object:Gem::Requirement
|
@@ -332,20 +332,6 @@ dependencies:
|
|
332
332
|
- - '='
|
333
333
|
- !ruby/object:Gem::Version
|
334
334
|
version: 0.23.1
|
335
|
-
- !ruby/object:Gem::Dependency
|
336
|
-
name: tty-spinner
|
337
|
-
requirement: !ruby/object:Gem::Requirement
|
338
|
-
requirements:
|
339
|
-
- - '='
|
340
|
-
- !ruby/object:Gem::Version
|
341
|
-
version: 0.9.3
|
342
|
-
type: :runtime
|
343
|
-
prerelease: false
|
344
|
-
version_requirements: !ruby/object:Gem::Requirement
|
345
|
-
requirements:
|
346
|
-
- - '='
|
347
|
-
- !ruby/object:Gem::Version
|
348
|
-
version: 0.9.3
|
349
335
|
- !ruby/object:Gem::Dependency
|
350
336
|
name: websocket-extensions
|
351
337
|
requirement: !ruby/object:Gem::Requirement
|
@@ -408,6 +394,14 @@ files:
|
|
408
394
|
- git_commit.sh
|
409
395
|
- lib/cryptum.rb
|
410
396
|
- lib/cryptum/api.rb
|
397
|
+
- lib/cryptum/api/exchange_rates.rb
|
398
|
+
- lib/cryptum/api/fees.rb
|
399
|
+
- lib/cryptum/api/order_history.rb
|
400
|
+
- lib/cryptum/api/orders.rb
|
401
|
+
- lib/cryptum/api/portfolio.rb
|
402
|
+
- lib/cryptum/api/products.rb
|
403
|
+
- lib/cryptum/api/rest.rb
|
404
|
+
- lib/cryptum/api/signature.rb
|
411
405
|
- lib/cryptum/bot_conf.rb
|
412
406
|
- lib/cryptum/event.rb
|
413
407
|
- lib/cryptum/event/bot_conf.rb
|
@@ -423,7 +417,6 @@ files:
|
|
423
417
|
- lib/cryptum/event/scroll.rb
|
424
418
|
- lib/cryptum/event/sell.rb
|
425
419
|
- lib/cryptum/log.rb
|
426
|
-
- lib/cryptum/matrix.rb
|
427
420
|
- lib/cryptum/open_ai.rb
|
428
421
|
- lib/cryptum/option.rb
|
429
422
|
- lib/cryptum/option/choice.rb
|
@@ -439,8 +432,10 @@ files:
|
|
439
432
|
- lib/cryptum/portfolio/balance.rb
|
440
433
|
- lib/cryptum/ui.rb
|
441
434
|
- lib/cryptum/ui/command.rb
|
435
|
+
- lib/cryptum/ui/exit.rb
|
442
436
|
- lib/cryptum/ui/key_press_event.rb
|
443
437
|
- lib/cryptum/ui/market_trend.rb
|
438
|
+
- lib/cryptum/ui/matrix.rb
|
444
439
|
- lib/cryptum/ui/order_execute_details.rb
|
445
440
|
- lib/cryptum/ui/order_execution.rb
|
446
441
|
- lib/cryptum/ui/order_plan.rb
|
@@ -456,6 +451,14 @@ files:
|
|
456
451
|
- lib/cryptum/web_sock/event_machine.rb
|
457
452
|
- order_books/.gitkeep
|
458
453
|
- reinstall_cryptum_gemset.sh
|
454
|
+
- spec/lib/cryptum/api/exchange_rates_spec.rb
|
455
|
+
- spec/lib/cryptum/api/fees_spec.rb
|
456
|
+
- spec/lib/cryptum/api/order_history_spec.rb
|
457
|
+
- spec/lib/cryptum/api/orders_spec.rb
|
458
|
+
- spec/lib/cryptum/api/portfolio_spec.rb
|
459
|
+
- spec/lib/cryptum/api/products_spec.rb
|
460
|
+
- spec/lib/cryptum/api/rest_spec.rb
|
461
|
+
- spec/lib/cryptum/api/signature_spec.rb
|
459
462
|
- spec/lib/cryptum/api_spec.rb
|
460
463
|
- spec/lib/cryptum/bot_conf_spec.rb
|
461
464
|
- spec/lib/cryptum/event/bot_conf_spec.rb
|
@@ -472,7 +475,6 @@ files:
|
|
472
475
|
- spec/lib/cryptum/event/sell_spec.rb
|
473
476
|
- spec/lib/cryptum/event_spec.rb
|
474
477
|
- spec/lib/cryptum/log_spec.rb
|
475
|
-
- spec/lib/cryptum/matrix_spec.rb
|
476
478
|
- spec/lib/cryptum/open_ai_spec.rb
|
477
479
|
- spec/lib/cryptum/option/choice_spec.rb
|
478
480
|
- spec/lib/cryptum/option/environment_spec.rb
|
@@ -487,8 +489,10 @@ files:
|
|
487
489
|
- spec/lib/cryptum/portfolio/balance_spec.rb
|
488
490
|
- spec/lib/cryptum/portfolio_spec.rb
|
489
491
|
- spec/lib/cryptum/ui/command_spec.rb
|
492
|
+
- spec/lib/cryptum/ui/exit_spec.rb
|
490
493
|
- spec/lib/cryptum/ui/key_press_event_spec.rb
|
491
494
|
- spec/lib/cryptum/ui/market_trend_spec.rb
|
495
|
+
- spec/lib/cryptum/ui/matrix_spec.rb
|
492
496
|
- spec/lib/cryptum/ui/order_execute_details_spec.rb
|
493
497
|
- spec/lib/cryptum/ui/order_execution_spec.rb
|
494
498
|
- spec/lib/cryptum/ui/order_plan_details_spec.rb
|
data/lib/cryptum/matrix.rb
DELETED
@@ -1,181 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'logger'
|
4
|
-
|
5
|
-
module Cryptum
|
6
|
-
# This plugin is used for my own entertainment
|
7
|
-
module Matrix
|
8
|
-
# Supported Method Parameters::
|
9
|
-
# Cryptum::Matrix.generate(
|
10
|
-
# cols: cols
|
11
|
-
# )
|
12
|
-
|
13
|
-
public_class_method def self.generate(opts = {})
|
14
|
-
# Need to divide by two for wide characters
|
15
|
-
cols = opts[:cols].to_i
|
16
|
-
|
17
|
-
matrix_arr = [
|
18
|
-
0x30a0.chr('UTF-8'),
|
19
|
-
0x30a1.chr('UTF-8'),
|
20
|
-
0x30a2.chr('UTF-8'),
|
21
|
-
0x30a3.chr('UTF-8'),
|
22
|
-
0x30a4.chr('UTF-8'),
|
23
|
-
0x30a5.chr('UTF-8'),
|
24
|
-
0x30a6.chr('UTF-8'),
|
25
|
-
0x30a7.chr('UTF-8'),
|
26
|
-
0x30a8.chr('UTF-8'),
|
27
|
-
0x30a9.chr('UTF-8'),
|
28
|
-
0x30aa.chr('UTF-8'),
|
29
|
-
0x30ab.chr('UTF-8'),
|
30
|
-
0x30ac.chr('UTF-8'),
|
31
|
-
0x30ad.chr('UTF-8'),
|
32
|
-
0x30ae.chr('UTF-8'),
|
33
|
-
0x30af.chr('UTF-8'),
|
34
|
-
0x30b0.chr('UTF-8'),
|
35
|
-
0x30b1.chr('UTF-8'),
|
36
|
-
0x30b2.chr('UTF-8'),
|
37
|
-
0x30b3.chr('UTF-8'),
|
38
|
-
0x30b4.chr('UTF-8'),
|
39
|
-
0x30b5.chr('UTF-8'),
|
40
|
-
0x30b6.chr('UTF-8'),
|
41
|
-
0x30b7.chr('UTF-8'),
|
42
|
-
0x30b8.chr('UTF-8'),
|
43
|
-
0x30b9.chr('UTF-8'),
|
44
|
-
0x30ba.chr('UTF-8'),
|
45
|
-
0x30bb.chr('UTF-8'),
|
46
|
-
0x30bc.chr('UTF-8'),
|
47
|
-
0x30bd.chr('UTF-8'),
|
48
|
-
0x30be.chr('UTF-8'),
|
49
|
-
0x30bf.chr('UTF-8'),
|
50
|
-
0x30c0.chr('UTF-8'),
|
51
|
-
0x30c1.chr('UTF-8'),
|
52
|
-
0x30c2.chr('UTF-8'),
|
53
|
-
0x30c3.chr('UTF-8'),
|
54
|
-
0x30c4.chr('UTF-8'),
|
55
|
-
0x30c5.chr('UTF-8'),
|
56
|
-
0x30c6.chr('UTF-8'),
|
57
|
-
0x30c7.chr('UTF-8'),
|
58
|
-
0x30c8.chr('UTF-8'),
|
59
|
-
0x30c9.chr('UTF-8'),
|
60
|
-
0x30ca.chr('UTF-8'),
|
61
|
-
0x30cb.chr('UTF-8'),
|
62
|
-
0x30cc.chr('UTF-8'),
|
63
|
-
0x30cd.chr('UTF-8'),
|
64
|
-
0x30ce.chr('UTF-8'),
|
65
|
-
0x30cf.chr('UTF-8'),
|
66
|
-
0x30d0.chr('UTF-8'),
|
67
|
-
0x30d1.chr('UTF-8'),
|
68
|
-
0x30d2.chr('UTF-8'),
|
69
|
-
0x30d3.chr('UTF-8'),
|
70
|
-
0x30d4.chr('UTF-8'),
|
71
|
-
0x30d5.chr('UTF-8'),
|
72
|
-
0x30d6.chr('UTF-8'),
|
73
|
-
0x30d7.chr('UTF-8'),
|
74
|
-
0x30d8.chr('UTF-8'),
|
75
|
-
0x30d9.chr('UTF-8'),
|
76
|
-
0x30da.chr('UTF-8'),
|
77
|
-
0x30db.chr('UTF-8'),
|
78
|
-
0x30dc.chr('UTF-8'),
|
79
|
-
0x30dd.chr('UTF-8'),
|
80
|
-
0x30de.chr('UTF-8'),
|
81
|
-
0x30df.chr('UTF-8'),
|
82
|
-
0x30e0.chr('UTF-8'),
|
83
|
-
0x30e1.chr('UTF-8'),
|
84
|
-
0x30e2.chr('UTF-8'),
|
85
|
-
0x30e3.chr('UTF-8'),
|
86
|
-
0x30e4.chr('UTF-8'),
|
87
|
-
0x30e5.chr('UTF-8'),
|
88
|
-
0x30e6.chr('UTF-8'),
|
89
|
-
0x30e7.chr('UTF-8'),
|
90
|
-
0x30e8.chr('UTF-8'),
|
91
|
-
0x30e9.chr('UTF-8'),
|
92
|
-
0x30ea.chr('UTF-8'),
|
93
|
-
0x30eb.chr('UTF-8'),
|
94
|
-
0x30ec.chr('UTF-8'),
|
95
|
-
0x30ed.chr('UTF-8'),
|
96
|
-
0x30ee.chr('UTF-8'),
|
97
|
-
0x30ef.chr('UTF-8'),
|
98
|
-
0x30f0.chr('UTF-8'),
|
99
|
-
0x30f1.chr('UTF-8'),
|
100
|
-
0x30f2.chr('UTF-8'),
|
101
|
-
0x30f3.chr('UTF-8'),
|
102
|
-
0x30f4.chr('UTF-8'),
|
103
|
-
0x30f5.chr('UTF-8'),
|
104
|
-
0x30f6.chr('UTF-8'),
|
105
|
-
0x30f7.chr('UTF-8'),
|
106
|
-
0x30f8.chr('UTF-8'),
|
107
|
-
0x30f9.chr('UTF-8'),
|
108
|
-
0x30fa.chr('UTF-8'),
|
109
|
-
0x30fb.chr('UTF-8'),
|
110
|
-
0x30fc.chr('UTF-8'),
|
111
|
-
0x30fd.chr('UTF-8'),
|
112
|
-
0x30fe.chr('UTF-8'),
|
113
|
-
'0 ',
|
114
|
-
'1 ',
|
115
|
-
'2 ',
|
116
|
-
'3 ',
|
117
|
-
'4 ',
|
118
|
-
'5 ',
|
119
|
-
'6 ',
|
120
|
-
'7 ',
|
121
|
-
'8 ',
|
122
|
-
'9 ',
|
123
|
-
'A ',
|
124
|
-
'c ',
|
125
|
-
'R ',
|
126
|
-
'y ',
|
127
|
-
'P ',
|
128
|
-
't ',
|
129
|
-
'U ',
|
130
|
-
'm ',
|
131
|
-
'x ',
|
132
|
-
'Z ',
|
133
|
-
': ',
|
134
|
-
'{ ',
|
135
|
-
'[ ',
|
136
|
-
'} ',
|
137
|
-
'] ',
|
138
|
-
'| ',
|
139
|
-
'` ',
|
140
|
-
'~ ',
|
141
|
-
'! ',
|
142
|
-
'@ ',
|
143
|
-
'# ',
|
144
|
-
'$ ',
|
145
|
-
'% ',
|
146
|
-
'^ ',
|
147
|
-
'& ',
|
148
|
-
'* ',
|
149
|
-
'( ',
|
150
|
-
') ',
|
151
|
-
'_ ',
|
152
|
-
'- ',
|
153
|
-
'= ',
|
154
|
-
'+ ',
|
155
|
-
'> ',
|
156
|
-
'< ',
|
157
|
-
'. ',
|
158
|
-
', '
|
159
|
-
]
|
160
|
-
|
161
|
-
last_index = matrix_arr.length - 1
|
162
|
-
|
163
|
-
matrix_row = ''
|
164
|
-
most_cols = cols - 1
|
165
|
-
most_cols.times.each do
|
166
|
-
matrix_row += "#{matrix_arr[Random.rand(0..last_index)]} "
|
167
|
-
end
|
168
|
-
matrix_row += matrix_arr[Random.rand(0..last_index)]
|
169
|
-
rescue StandardError => e
|
170
|
-
raise e
|
171
|
-
end
|
172
|
-
|
173
|
-
# Display Usage for this Module
|
174
|
-
|
175
|
-
public_class_method def self.help
|
176
|
-
puts "USAGE:
|
177
|
-
logger = #{self}.create()
|
178
|
-
"
|
179
|
-
end
|
180
|
-
end
|
181
|
-
end
|