field_mask_builder 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 9494404fef040fb8feefec323786e3a7bb790c6da162fc82484c34a786c989e5
4
- data.tar.gz: bd31a98d7357d289de0ef9957ac61dbc620490712170d830027b2a0c114f16d9
3
+ metadata.gz: 259f7b32872df9edc41bd1cdc8d17e59954538de03e4ddc0df8482e9ed4d1d30
4
+ data.tar.gz: e589a01db829ccdca0fabb8e8ad48d198ebf738f1b73ed0ba4fb1d7f5b0f205d
5
5
  SHA512:
6
- metadata.gz: 351504dd2ff64ccdb96f6af05f9f8a7b81f50c0c036d9afe0a3e8e462cf9a1939df0f7af4a0a4429171c3ff260f8213305e6bea366dcf9c7c02c5ce56d7a26b7
7
- data.tar.gz: b1f54e9f77379d0da3c3e408f135807dc6cc66529cd4356dc7e00e4e7b42fa21df41d8f7a772f83952b2a705bf7012496e01e868acce7c9c22f3cafc812adbe0
6
+ metadata.gz: 23891c3b86f7fe240e011128571dcec35ae7fc86de9f5bb94c59cb1f3d51f37fff5d7a650b13c6e57b076236a3dd157d85144154a1bd68010681a6fdde4543f4
7
+ data.tar.gz: f10681e787ebe2e03d5c507cc7ff80bf915d68c58bd9ea03a0d68b490878217d4088f67b8f650388143163cc82339df4b01c4d7b3d6bf9d58ac81c768f446062
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- field_mask_builder (0.1.0)
4
+ field_mask_builder (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -13,7 +13,6 @@ module FieldMaskBuilder
13
13
  @fields = fields
14
14
  end
15
15
 
16
- # @param [<Symbol | { Symbol => Array }>] fields
17
16
  # @return [<String>]
18
17
  def build
19
18
  r = []
@@ -22,7 +21,7 @@ module FieldMaskBuilder
22
21
  when Symbol, String
23
22
  r.push(f.to_s)
24
23
  when Hash
25
- r += to_fields(f)
24
+ r += to_field_mask_paths(f)
26
25
  else
27
26
  raise "f must be Symbol or String or Hash, but got #{f}"
28
27
  end
@@ -32,9 +31,9 @@ module FieldMaskBuilder
32
31
 
33
32
  private
34
33
 
35
- # @param [{ Symbol => <Symbol | Hash> }] hash
34
+ # @param [Hash] hash
36
35
  # @return [<String>]
37
- def to_fields(hash)
36
+ def to_field_mask_paths(hash)
38
37
  r = []
39
38
  hash.each do |entity, fields|
40
39
  Helper.to_array(fields).each do |f|
@@ -42,7 +41,7 @@ module FieldMaskBuilder
42
41
  when Symbol, String
43
42
  r.push("#{entity}.#{f}")
44
43
  when Hash
45
- r += to_fields(f).map { |_f| "#{entity}.#{_f}" }
44
+ r += to_field_mask_paths(f).map { |p| "#{entity}.#{p}" }
46
45
  else
47
46
  raise "f must be Symbol or String or Hash, but got #{f}"
48
47
  end
@@ -1,3 +1,3 @@
1
1
  module FieldMaskBuilder
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: field_mask_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nao Minami