hashed_struct 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 2f1439bfcd10dc98dd6c383516d4b235f1796eea
4
- data.tar.gz: e0ce651890306a3a5ee42c00f49e5bed5a464fdb
3
+ metadata.gz: bca9e1bf25e49cfc9e4e11d1cd0ebb59db3d7a06
4
+ data.tar.gz: 066b6f6965b0d8a75ce4684c5211f1def3f36ec4
5
5
  SHA512:
6
- metadata.gz: 51dce14a7d23a87e45e2271493607b20d0662be40f61d3a132f10fccb34e0819f825bac70def1cb35d3643479894ea3a5747d71c430cd0392aeaaf0c6e2ac5a0
7
- data.tar.gz: 922dfd0dbc1b3eb8b0cc8aad8b22c22bb27f8bfd40baca49eb9126e8fa432ea51e52b8e1af57e497061fcab6c376fe95eddc984f8816ada3e6c17e8d2c67bd80
6
+ metadata.gz: e917e0c7ff473716908ac6751a13130f466f7644cd6ee431056cc5b5006066a210608fac065e3ffc56b883acf3e885444e12b0b0c644858efb72ca32bb133818
7
+ data.tar.gz: e2174dbc0a9027250ae6d7a96680f5dce3d35495de0dcc08aed7c05edf3aaf693e53da5d9ebaeb629496f59e61955de3e666b008565396583a89b4cdb4d290f1
data/README.md CHANGED
@@ -6,7 +6,7 @@ Struct with hash as initialization argument, to avoid dependency on positional a
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- gem 'hashed_struct', '~> 0.0.1'
9
+ gem 'hashed_struct', '~> 0.0.2'
10
10
 
11
11
  And then execute:
12
12
 
@@ -33,3 +33,7 @@ Person.new(name: 'Joe', age: 30, gender: 'Male')
33
33
  3. Commit your changes (`git commit -am 'Add some feature'`)
34
34
  4. Push to the branch (`git push origin my-new-feature`)
35
35
  5. Create a new Pull Request
36
+
37
+ ## Special thanks
38
+ - Hanmac (#ruby on freenode)
39
+ - apeiros (#ruby on freenode)
data/lib/hashed_struct.rb CHANGED
@@ -3,11 +3,9 @@ require 'hashed_struct/version'
3
3
  class HashedStruct
4
4
 
5
5
  def self.new(*fields)
6
- Struct.new(*fields).tap do |klass|
7
- klass.class_eval do
8
- def initialize(options={})
9
- super(*options.values_at(*self.class.members))
10
- end
6
+ Struct.new(*fields) do
7
+ def initialize(options={})
8
+ super(*options.values_at(*self.class.members))
11
9
  end
12
10
  end
13
11
  end
@@ -1,3 +1,3 @@
1
1
  class HashedStruct
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hashed_struct
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
  - Fire-Dragon-DoL