kosher 0.2.13 → 0.2.14

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.
data/lib/kosher/offer.rb CHANGED
@@ -2,6 +2,18 @@ module Kosher
2
2
  class Offer < Struct.new(:id, :item, :seller, :shipping)
3
3
  include Comparable
4
4
 
5
+ BASE_CURRENCY = 'EUR'
6
+
7
+ class << self
8
+ def base_currency
9
+ @base_currency ||= BASE_CURRENCY
10
+ end
11
+
12
+ def base_currency=(currency)
13
+ @base_currency = currency
14
+ end
15
+ end
16
+
5
17
  def <=>(other)
6
18
  if self.kosher? != other.kosher?
7
19
  self.kosher? ? -1 : 1
@@ -11,11 +23,7 @@ module Kosher
11
23
  end
12
24
 
13
25
  def base_currency
14
- @base_currency ||= 'EUR'
15
- end
16
-
17
- def base_currency=(currency)
18
- @base_currency = currency
26
+ self.class.base_currency
19
27
  end
20
28
 
21
29
  def kosher?
@@ -1,3 +1,3 @@
1
1
  module Kosher
2
- VERSION = '0.2.13'
2
+ VERSION = '0.2.14'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: kosher
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.13
5
+ version: 0.2.14
6
6
  platform: ruby
7
7
  authors:
8
8
  - Paper Cavalier