uinit-structure 0.1.3 → 0.1.4

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: c15895eb9482a3f6f4da9fd7e32cf7faa7b00e8dcc313a88526a1be679532eb2
4
- data.tar.gz: 4fb76f7c50604b5f1cbd2ff0d245f1586b4e30376f15db6c685e8bea9f427e27
3
+ metadata.gz: 8cb370826705dbff7a6e5655c6d53e5b42dd58a2c5adfa25187b97532fb28ac8
4
+ data.tar.gz: e3e335c203daf426838917777d9205092c6ba6a574d057524c62583ac106c121
5
5
  SHA512:
6
- metadata.gz: 786b0bd30d8855c54271a5a5260459182a5c25a9fe878be6dcc6676822e372eb655980c86a545c5343f736906dc084d9ba11e52ddeee397c4459d65d47aac8e0
7
- data.tar.gz: 950e1d19b84cdb1101285190c574feb1015fb3b7e9852b6da26bc65e9229272cbc51bbca20f5e2450b51ed72d84ef0ea2cc8bb61410e92cb49822197dd16e096
6
+ metadata.gz: 4fd715aab45e5660901e17d31a59b4a7d9f9f280490904103ab14a37f92886852bcd57575835f9c5e75962f9a0d4f9aae43f093095b1455aea791b1c9650aba1
7
+ data.tar.gz: ca550ec25381be0da16da74b2c807b5b48365d58aff1e8da0c571d00c2f507220f1ec2e3126bcf25410f2b91141e2b511094739bfd37c2d05aaae169824e45fe
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Uinit
4
4
  module Structure
5
- VERSION = '0.1.3'
5
+ VERSION = '0.1.4'
6
6
  end
7
7
  end
@@ -24,7 +24,7 @@ module Uinit
24
24
  class_methods do
25
25
  include Memoizable
26
26
 
27
- attr_reader :attributes
27
+ attr_reader :attributes, :attributes_scope
28
28
 
29
29
  memo def structure_schema
30
30
  if respond_to?(:superclass) && superclass.respond_to?(:structure_schema)
@@ -43,7 +43,8 @@ module Uinit
43
43
  end
44
44
 
45
45
  def struct(&)
46
- attributes = AttributeScope.new(self).scope(&).attributes
46
+ self.attributes_scope = AttributeScope.new(self)
47
+ attributes = attributes_scope.scope(&).attributes
47
48
 
48
49
  attributes.each do |attribute|
49
50
  raise NameError, 'Attribute must have a name' unless attribute.name
@@ -60,11 +61,13 @@ module Uinit
60
61
  self.attributes = attributes.each_with_object(sup_attributes) do |attribute, hsh|
61
62
  hsh[attribute.name] = attribute
62
63
  end
64
+
65
+ self.attributes_scope = nil
63
66
  end
64
67
 
65
68
  private
66
69
 
67
- attr_writer :attributes
70
+ attr_writer :attributes, :attributes_scope
68
71
  end
69
72
 
70
73
  memo def get_structure_schema = self.class.structure_schema
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uinit-structure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kimoja