as_json_representations 0.4.2 → 0.4.3

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: 7faf28c845c3b7832fba7ffee9a65652e21cd958620644dbc0a9ba7a451d8c76
4
- data.tar.gz: f35552a18dddb0be28fa057741127834aadf64969f7f64a662d24050e27dc7f5
3
+ metadata.gz: 7303933b1ec6f554b43cb2c14c09325faf4cbd50935537da910d1a8069d6cfb6
4
+ data.tar.gz: d1420afac1861f0e044544bb9a48cebdd55ec77875e9487eb99175406a2cdad3
5
5
  SHA512:
6
- metadata.gz: 361dbc0c1965bbf56a59eb9a0138f00cb52f20dd9f57f6ec035507977175bacb5a384bbaa846f51aac7488ce7773f394e4c1235d45e278a0826e19c04e00ffcc
7
- data.tar.gz: 4383c6c23e6bcc495ae13ade123bcde28f19d5945ab59e1520f51d0597620abdb44bcedeaf5255af11910d1006f21a4b13c39e6bfb77c5fe9b97a7a426abfeea
6
+ metadata.gz: e701364c44f827f43decab103fd106b00a30cb691c30fcfc1de2182b6e52c75f855c074118f1eedcdcf307ead5d0d4541f0730e4ee4208fcb29a2447cba47c43
7
+ data.tar.gz: f6c989bd434fc0c17f3ba6cbe23dec6d59c1ee58ae33589648854d0e8017ed65e890aa36e317cbdc47ca802c577ffb767194586c1e054c6d3922f031a8b3da01
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- as_json_representations (0.4.2)
4
+ as_json_representations (0.4.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -11,12 +11,12 @@ module AsJsonRepresentations
11
11
  @representations
12
12
  end
13
13
 
14
- def parent
15
- @parent
14
+ def parent_entity
15
+ @parent_entity
16
16
  end
17
17
 
18
18
  def find_representation(name)
19
- representations[name] || @parent&.find_representation(name) if name
19
+ representations[name] || @parent_entity&.find_representation(name) if name
20
20
  end
21
21
 
22
22
  def render_representation(object, options)
@@ -32,7 +32,7 @@ module AsJsonRepresentations
32
32
 
33
33
  representation =
34
34
  if representation[:extend] == true
35
- representation[:class].parent&.find_representation(representation[:name])
35
+ representation[:class].parent_entity&.find_representation(representation[:name])
36
36
  else
37
37
  find_representation(representation[:extend])
38
38
  end
@@ -63,7 +63,7 @@ module AsJsonRepresentations
63
63
  def self.included(base)
64
64
  return unless base.class == Module
65
65
  AsJsonRepresentations.send(:included, base)
66
- base.instance_variable_set :@parent, self
66
+ base.instance_variable_set :@parent_entity, self
67
67
  end
68
68
  end
69
69
  end
@@ -1,3 +1,3 @@
1
1
  module AsJsonRepresentations
2
- VERSION = '0.4.2'
2
+ VERSION = '0.4.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: as_json_representations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - rjurado01
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-26 00:00:00.000000000 Z
11
+ date: 2018-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler