immutable_struct 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/immutable_struct.rb +4 -4
  2. metadata +56 -61
@@ -1,10 +1,10 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  class ImmutableStruct
4
- VERSION = '1.0.2'
4
+ VERSION = '1.1.0'
5
5
 
6
- def self.new(*attrs)
7
- struct = Struct.new(*attrs)
6
+ def self.new(*attrs, &block)
7
+ struct = Struct.new(*attrs, &block)
8
8
  make_immutable!(struct)
9
9
  optionalize_constructor!(struct)
10
10
  extend_dup!(struct)
@@ -48,4 +48,4 @@ private
48
48
  end
49
49
  end
50
50
  end
51
- end
51
+ end
metadata CHANGED
@@ -1,94 +1,89 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: immutable_struct
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 0
8
- - 2
9
- version: 1.0.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Theo Hultberg
9
+ - Ben Cates
13
10
  autorequire:
14
11
  bindir: bin
15
12
  cert_chain: []
16
-
17
- date: 2010-09-26 00:00:00 +02:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
13
+ date: 2012-12-20 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
21
16
  name: rspec
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
24
18
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- version: "0"
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
31
23
  type: :development
32
- version_requirements: *id001
33
- - !ruby/object:Gem::Dependency
34
- name: yard
35
24
  prerelease: false
36
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: !ruby/object:Gem::Requirement
37
26
  none: false
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
- version: "0"
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
31
+ - !ruby/object:Gem::Dependency
32
+ name: yard
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
44
39
  type: :development
45
- version_requirements: *id002
46
- description: A version of Ruby's Struct class that creates classes whose instances are immutable. It works just as Struct, but there are no setters, and you can't use []=. As a bonus feature the constructor of classes inheriting from ImmutableStruct can take named parameters in the form of a hash.
47
- email:
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ description: A version of Ruby's Struct class that creates classes whose instances
48
+ are immutable. It works just as Struct, but there are no setters, and you can't
49
+ use []=. As a bonus feature the constructor of classes inheriting from ImmutableStruct
50
+ can take named parameters in the form of a hash.
51
+ email:
48
52
  - theo@iconara.net
49
53
  executables: []
50
-
51
54
  extensions: []
52
-
53
55
  extra_rdoc_files: []
54
-
55
- files:
56
+ files:
56
57
  - lib/immutable_struct.rb
57
58
  - LICENSE
58
59
  - README.mdown
59
- has_rdoc: true
60
60
  homepage: http://github.com/iconara/immutable_struct
61
61
  licenses: []
62
-
63
62
  post_install_message:
64
63
  rdoc_options: []
65
-
66
- require_paths:
64
+ require_paths:
67
65
  - lib
68
- required_ruby_version: !ruby/object:Gem::Requirement
66
+ required_ruby_version: !ruby/object:Gem::Requirement
69
67
  none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- segments:
68
+ requirements:
69
+ - - ! '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ segments:
74
73
  - 0
75
- version: "0"
76
- required_rubygems_version: !ruby/object:Gem::Requirement
74
+ hash: -1539629381701947524
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
76
  none: false
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- segments:
82
- - 1
83
- - 3
84
- - 6
77
+ requirements:
78
+ - - ! '>='
79
+ - !ruby/object:Gem::Version
85
80
  version: 1.3.6
86
81
  requirements: []
87
-
88
82
  rubyforge_project: immutable_struct
89
- rubygems_version: 1.3.7
83
+ rubygems_version: 1.8.23
90
84
  signing_key:
91
85
  specification_version: 3
92
- summary: A version of Ruby's Struct class that creates classes whose instances are immutable
86
+ summary: A version of Ruby's Struct class that creates classes whose instances are
87
+ immutable
93
88
  test_files: []
94
-
89
+ has_rdoc: