compare_supermarkets 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0688044d1c56cc8c8164f34a42b903d9d9494190e39a67a63ac4787e56518f1f'
4
- data.tar.gz: 804075bcdf870487edbd34b974d03a299bd6e6b5c71765a55342d20cdc25ad32
3
+ metadata.gz: be79dd9f242a73aea055493be6268a0dbcc606dedf4cfe9df3106a76b0f03c68
4
+ data.tar.gz: bcc72badfba9c2e8cd4ee0639c1c3044f43ba9eaea0c3b563d0d2eceab2bd3bd
5
5
  SHA512:
6
- metadata.gz: ba6f9a90391a79bd4a97e4e17eb80430ca2f3e56f40a9e62471c5ad882a659949e99e6658e9a0447d259835015cfdb86a1a521b495f04603e4a1acf66fa5822f
7
- data.tar.gz: 6469bc600caf893bd54da6db246b8585b28a87e0c41e8d88859e5edc80522d4fec74848aeff71f47375dc8f97bb5ec15c89da521cc6c945eff9cc9ab4589c3bb
6
+ metadata.gz: 576e362afdf6795bdb834c09b4c52c7409350b4d56e21a98b9df5ea3a2f4120f3c8d334183bdc753378075bf24ac23769ae764511c6d66f19579fe7cd731faa4
7
+ data.tar.gz: ac63b86e0c2143078c7d8789de28746fd3c9c3967118794317e310e370c8f7681760b9eaa02dcb9e70015734137e03a1945598e6a34ef6a1f329dd6b8bcc0f06
@@ -42,15 +42,15 @@ class CompareSupermarkets::CLI
42
42
  self.search_supermarkets(input)
43
43
  puts ""
44
44
  puts ""
45
- if CompareSupermarkets::Product.all_count > 10
45
+ if CompareSupermarkets::Product.count > 10
46
46
  puts ""
47
47
  puts "Ooo, jeez, seems like we have a lot of results."
48
- puts "We have #{CompareSupermarkets::Product.all_count} results for you."
48
+ puts "We have #{CompareSupermarkets::Product.count} results for you."
49
49
  puts "If you were a little more specific with your search"
50
50
  puts "term, we would have less to sort through..."
51
51
  puts ""
52
52
  change_search_term
53
- elsif CompareSupermarkets::Product.all_count == 0
53
+ elsif CompareSupermarkets::Product.count == 0
54
54
  puts ""
55
55
  puts "Ohhh man! Doesn't seem like either supermarket carry"
56
56
  puts "that product."
@@ -58,7 +58,7 @@ class CompareSupermarkets::CLI
58
58
  change_search_term
59
59
  else
60
60
  puts ""
61
- puts "Great! We have #{CompareSupermarkets::Product.all_count} items for you."
61
+ puts "Great! We have #{CompareSupermarkets::Product.count} items for you."
62
62
  puts ""
63
63
  puts ""
64
64
  puts ""
@@ -79,7 +79,7 @@ class CompareSupermarkets::CLI
79
79
  puts ""
80
80
  puts "No worries"
81
81
  puts ""
82
- if CompareSupermarkets::Product.all_count > 0
82
+ if CompareSupermarkets::Product.count > 0
83
83
  how_to_display
84
84
  else
85
85
  puts ""
@@ -26,7 +26,7 @@ class CompareSupermarkets::Product
26
26
  @all
27
27
  end
28
28
 
29
- def self.all_count
29
+ def self.count
30
30
  @@all.count
31
31
  end
32
32
 
@@ -54,7 +54,7 @@ class CompareSupermarkets::Product
54
54
  sorted = @@all.sort_by! do |s|
55
55
  price_to_sort = s.dollar_value + '.' + s.cent_value
56
56
  price_to_sort.to_f
57
- end
57
+ end
58
58
  end
59
59
 
60
60
  def self.all_top_10_sorted_by_price
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CompareSupermarkets
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compare_supermarkets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Berger Howes