best_nba_players_18 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 325fb0867855cad738730d4bc918590f9603c04c
4
- data.tar.gz: 84f284f716446b51f60f6ef7c1fa7b5254e47e65
3
+ metadata.gz: 0b0878d5f2d129598b25cd88fd8b6cd011cf9af8
4
+ data.tar.gz: df5ca9139d8e769d8430f2c74c7b9866f9fdced1
5
5
  SHA512:
6
- metadata.gz: 4556056e38039a5341a4a136ad2f9ab1fcdabe043f30d973bc6eb6d53506dcec83df28bdd8445423c21df7809336dd247babf02b8d6cedf657d545be86a03cfd
7
- data.tar.gz: 9f292ffe7f86f595e5abc0d638ccf9f89b6cbb0060208e073c4f80e8658379b45158caed54bc07612f525ad45b5ea06fe446459b0756158f8ea0b3f45830708e
6
+ metadata.gz: d7e3e1cffc87ac17bb94881f0e66f661359ae65b4fb4575e39e63a97d50c68404310d4a0e06c5f67d3537b541b66380272277f0a1840c72f2c9009f331dc37ad
7
+ data.tar.gz: c87ae8edb6c8a058a85722d3f8783e385124e79c74dd314de1eddfd096db510e8eed8a0b4d2892e215b2761db6c6bb90db891c8130ea7fc2cff4ef845ae206c9
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- best_nba_players_18 (0.1.0)
4
+ best_nba_players_18 (0.1.3)
5
5
  colorize (~> 0.8.0)
6
6
  nokogiri (~> 1.8, >= 1.8.4)
7
7
  terminal-table (~> 1.8, >= 1.7.9)
@@ -48,6 +48,7 @@ module BestNbaPlayersS18
48
48
  print "=> "
49
49
  n_palyer = gets.strip.to_i
50
50
  n_palyer = 1 if n_palyer == 0
51
+ n_palyer = 80 if n_palyer > 100
51
52
 
52
53
  #print_players index
53
54
  print_players n_palyer, order if order.class == String
@@ -56,6 +57,7 @@ module BestNbaPlayersS18
56
57
  puts "What player do you want to see more information on?"
57
58
  print "=> "
58
59
  input = gets.strip.to_i
60
+ input = 100 if input > 100
59
61
 
60
62
  #print_player index
61
63
  player = BestNbaPlayersS18::Players.find input
@@ -71,6 +73,7 @@ module BestNbaPlayersS18
71
73
  print "=> "
72
74
  n_trend = gets.strip.to_i
73
75
  n_trend = 1 if n_trend == 0
76
+ n_trend = 3 if n_trend > 3
74
77
 
75
78
  choices = ["neutral", "up", "down"]
76
79
  by_input = choices[n_trend-1]
@@ -81,6 +84,8 @@ module BestNbaPlayersS18
81
84
  puts "What player do you want to see more information on?"
82
85
  print "=> "
83
86
  input = gets.strip.to_i
87
+ sizeg = BestNbaPlayersS18::Players.group_size by_input
88
+ input = sizeg if input > sizeg
84
89
 
85
90
  #print_player index
86
91
  player = BestNbaPlayersS18::Players.find_group input, by_input
@@ -146,6 +151,7 @@ module BestNbaPlayersS18
146
151
  end
147
152
 
148
153
  end
154
+ rows << arr
149
155
  title = {up: "UPSWING".colorize(:green), down: "DECLINE".colorize(:red), neutral: "CONSTANT"}
150
156
  puts Terminal::Table.new :title => title[by_input.to_sym], :rows => rows, :style =>{:all_separators => true}
151
157
  end
@@ -66,5 +66,9 @@ module BestNbaPlayersS18
66
66
  group(by_input)[index-1]
67
67
  end
68
68
 
69
+ def self.group_size by_input
70
+ group(by_input).size
71
+ end
72
+
69
73
  end
70
74
  end
@@ -1,3 +1,3 @@
1
1
  module BestNbaPlayersS18
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: best_nba_players_18
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - "'Mac Dowell Prosper'"