bill_hicks 1.1.9.pre2 → 1.1.9.pre3

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: de50980504242ddc3e1ab515b414599f207f91c6
4
- data.tar.gz: a96db8764d8d57558b970143a0d7ef37a76dd98a
3
+ metadata.gz: 24ae9a58bac5093ef7394be92c855a7f6c6500f6
4
+ data.tar.gz: 9e815c6bf17d31feaa615a32d77907f78fc97d9f
5
5
  SHA512:
6
- metadata.gz: abdd05f09745bb346721a30356fb9b7482a42fb49926ffc7048a2bb04c70d8b7cfe6e2368b8d6904454df6a0be1c553f854770f799db1b2c13888460e566a38c
7
- data.tar.gz: 4bf812931f7dc471ffa69c2fba1edf9ba49691338b67f3295132073966a1d611167622077ce31896a5975efea62c7f822eee325b627e3ceda2b4ab485e4ea957
6
+ metadata.gz: c3d3f6efb9b0a66109cd8bffc5bfb379fcfebc89b8d4d76d2b1510bec34719598e874ffdc9bc236d2bc746b8426db33de8e7dc8af087fb846f07d3a244dc230c
7
+ data.tar.gz: bf49e2eebdbfab42f67ff06fe1da3470271834f0d742eead1384d85249524f2f5c0bb7893d7b570a00c4cbead5bf476b7a1d1117dcffc22a62ed5d5766180c3c
@@ -1,14 +1,18 @@
1
1
  module BillHicks
2
2
  class BrandConverter
3
+
4
+ @@brands = nil
5
+
3
6
  def self.convert(value)
4
- if brand = @brands.detect {|brand| brand[:prefix] == value.split[0] }
7
+ if brand = self.brands.detect {|brand| brand[:prefix] == value.split[0] }
5
8
  brand[:company].empty? ? value.split[0] : brand[:company]
6
9
  else
7
10
  value.split[0]
8
11
  end
9
12
  end
10
13
 
11
- @brands = [
14
+ def self.brands
15
+ @@brands ||= [
12
16
  {"prefix":"2A","company":"2A ARMAMENT"},
13
17
  {"prefix":"AAE","company":"AA&E"},
14
18
  {"prefix":"ADAMS","company":"ADAMS ARMS"},
@@ -392,8 +396,8 @@ module BillHicks
392
396
  {"prefix":"XP","company":"X PRODUCTS LLC"},
393
397
  {"prefix":"YHM","company":"YANKEE HILL MACHINE CO., INC."},
394
398
  {"prefix":"ZS","company":"CARL ZEISS SBE, LLC."},
395
- {"prefix":"ZEN","company":"ZENITH FIREARMS"}
396
- ]
399
+ {"prefix":"ZEN","company":"ZENITH FIREARMS"}]
400
+ end
397
401
 
398
402
  end
399
403
  end
@@ -1,3 +1,3 @@
1
1
  module BillHicks
2
- VERSION = '1.1.9.pre2'
2
+ VERSION = '1.1.9.pre3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bill_hicks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9.pre2
4
+ version: 1.1.9.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Campbell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-17 00:00:00.000000000 Z
11
+ date: 2017-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: smarter_csv