public_attributes 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/public_attributes.rb +1 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a03f830869d3d96336db10de1b0dcb843e659a7b
4
- data.tar.gz: a77f0073157f8c258533b88f5d5d343d937d06fd
3
+ metadata.gz: 504b834309e8c52420e62fbaa29192a0855dc3b3
4
+ data.tar.gz: 342facc081a47a29faeb5229161e3a331bd507dd
5
5
  SHA512:
6
- metadata.gz: 2659ed187c79cfa009b31ba62ccf019c46b2c917ed36c103346d6c1dc2471b05b7ef8592a0de4d4060aec2fabfaef935b9a15194d0fd479867316642e6cdfd32
7
- data.tar.gz: 4f6bf6da9fcf0b7c366002f710379079e93694458cf66fb6f47531d744b219582981fc2dd5961616ce8bde4fc8e014861e413b2b1a3f7877647b28d53203cce0
6
+ metadata.gz: d4a779b58cdf45539d0542c62ca5893a8e0561b264540af36170732c4b75d6b5dfd02ff841226cc430fc60be9f185b8e24e0c0e7be9ab61f37065c66baf7515f
7
+ data.tar.gz: 547c4f1b0bccb6d1ea5f5c6ca6e5b1ddb0b79a6a0a4ac1f89213bdf96405025578d6a9fc6503a8975f347c23c87edb250fb3c2f19e5bcfbdc70a32df4328884e
@@ -11,12 +11,11 @@ module PublicAttributes
11
11
  @_public_attributes ||= {}
12
12
 
13
13
  def self.included(klass)
14
- @_public_attributes[klass.name] ||= []
15
14
  klass.extend(ClassMethods)
16
15
  end
17
16
 
18
17
  def self.add(class_name, attr_list)
19
- @_public_attributes[class_name].push(*attr_list)
18
+ @_public_attributes[class_name] = *attr_list
20
19
  @_public_attributes[class_name].uniq!
21
20
  end
22
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: public_attributes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Hackley