alba 0.10.2 → 0.11.0

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: c5b12eead5b50b0e426952a2318fa85d852326a078fa5e285dc7a402ee19688d
4
- data.tar.gz: 89dc5fb1295528255ba028e2dfd8e30a2c136ff8a2ac9b9fb65b869a259f9435
3
+ metadata.gz: f9adc72b171ef6c74c4198ddad4cc8f629c416c62c6b8d8a9698efdbe9dccc44
4
+ data.tar.gz: af33f05822bfee2bdfe455d4b7a9e75b0e2486c692297e24ab28768c0a839b24
5
5
  SHA512:
6
- metadata.gz: c7d13ca3b2c592e97501cfb79de3aba84eb9ffeb107099bccde9a55a81b6bd36c93e9acda83d237b1e36de8dc34b3bb5aabbad68c7dd09cb998a5482d11f86f3
7
- data.tar.gz: 8e9ab49f10f5f09669ffc27135d9fe5fe57da8b5d9e57cd7d250d661d7f5cc0f9453992c78d8db3fbd8c08ed22b4b058266faf63977f95668481151a42434d97
6
+ metadata.gz: 2b289f590bf7b4cc3682b13f7841e9408f61ba7d49c0521b05649fb658745cd76c91032f3c2ee83224a1407f17686dc01eb383d90219877ac6f077b05095ce4c
7
+ data.tar.gz: f842f9775b8355ed1b0dd88ea14aaecd57699fc578a11c38bf3a3d12ad04bbf01dbe0867bb30efc4cc73f1e7766d6e0e0e750741c6130dd33562434bfea6ba8b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- alba (0.10.2)
4
+ alba (0.11.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -5,7 +5,7 @@ module Alba
5
5
  class Many < Association
6
6
  def to_hash(target, params: {})
7
7
  objects = target.public_send(@name)
8
- objects = @condition.call(objects) if @condition
8
+ objects = @condition.call(objects, params) if @condition
9
9
  objects.map { |o| @resource.new(o, params: params).to_hash }
10
10
  end
11
11
  end
@@ -5,7 +5,7 @@ module Alba
5
5
  class One < Association
6
6
  def to_hash(target, params: {})
7
7
  object = target.public_send(@name)
8
- object = @condition.call(object) if @condition
8
+ object = @condition.call(object, params) if @condition
9
9
  @resource.new(object, params: params).to_hash
10
10
  end
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module Alba
2
- VERSION = '0.10.2'.freeze
2
+ VERSION = '0.11.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alba
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OKURA Masafumi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-24 00:00:00.000000000 Z
11
+ date: 2020-08-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Alba is designed to be a simple, easy to use and fast alternative to
14
14
  existing JSON serializers. Its performance is better than almost all gems which