item_builder 0.1.17 → 0.1.18

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: bfe76bc69e820c18a13d2a141af1306a4ac0872635d1e3e938e9cbe25a6bbcd2
4
- data.tar.gz: 5c3ce99ab71ccad992bdf2097c97337ff0e848798a97e9978d2c282ce0e56051
3
+ metadata.gz: 2d5296817adbceee44af0d40c56904531f0d83e719e3845a91a331b1c5442167
4
+ data.tar.gz: 87abd04e435be4b3dbaf7da63496c9b081f467f142ecf2c05f6b00f79f13126c
5
5
  SHA512:
6
- metadata.gz: d26999a5d454b647b0a4943654ba55674de42d504d3318bf7084ce179280cf30405e8b6995b3efa5c894025b09cf6d9db84eea331de0e540525b52716d57b8de
7
- data.tar.gz: '07980a0aee5587888f85209b63e8531c4702bf80d7a820c2d4cd2463bffaa4cadd5007194de21a7a55f958915dd73ffeed444dc458051754c7159bab6ec55de8'
6
+ metadata.gz: 8d9e2954488f28ffa4e4ce03718ed29d116703eeb8ee76005c601da879250d022638f8bd93ed318ecf1e4b7d9686047f8fb1d1024b9207fe3585b26ad1fa2600
7
+ data.tar.gz: 275d56b3d9313b451571df31fc18166a03ea4e2ca57a50d0b03a2c6bf8d55397543dd229057870ae6784a31be11d89857699ec241c624173f98b4ae5580a68f3
@@ -35,14 +35,18 @@ class ItemBuilder
35
35
 
36
36
  def quantity_mode
37
37
  listings.map do |listing|
38
- modes[mode].new(
39
- listing: listing,
40
- wh_spaces: wh_spaces,
41
- variants: variants
42
- ).perform
38
+ modes[mode].new(qty_params(listing)).perform
43
39
  end
44
40
  end
45
41
 
42
+ def qty_params(listing)
43
+ {
44
+ listing: listing,
45
+ wh_spaces: wh_spaces,
46
+ variants: variants
47
+ }
48
+ end
49
+
46
50
  def default
47
51
  listings.map do |listing|
48
52
  modes[mode].new(listing: listing).perform
@@ -13,8 +13,8 @@ class ItemBuilder
13
13
  attr_reader :variants
14
14
  def initialize(args)
15
15
  @listing = args.fetch(:listing)
16
- @wh_spaces = args.fetch(:wh_spaces) || []
17
- @variants = args.fetch(:variants) || []
16
+ @wh_spaces = args.fetch(:wh_spaces, [])
17
+ @variants = args.fetch(:variants, [])
18
18
  end
19
19
 
20
20
  def base
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ItemBuilder
4
- VERSION = '0.1.17'
4
+ VERSION = '0.1.18'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: item_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - okaaryanata
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-18 00:00:00.000000000 Z
11
+ date: 2021-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler