classy_struct 0.3.0 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +7 -3
- data/VERSION +1 -1
- data/lib/classy_struct.rb +1 -9
- metadata +20 -9
data/README.rdoc
CHANGED
@@ -38,12 +38,16 @@ converted to ClassyStruct objects:
|
|
38
38
|
|
39
39
|
* Fork the project.
|
40
40
|
* Make your feature addition or bug fix.
|
41
|
-
*
|
41
|
+
* Make sure you don't break the existing specs.
|
42
|
+
* Add specs for it. The specs should break with the buggy
|
43
|
+
version if you're fixing a bug, or verify the new functionality
|
44
|
+
you're adding. This is important so I don't break it in a
|
42
45
|
future version unintentionally.
|
43
46
|
* Commit, do not mess with rakefile, version, or history.
|
44
47
|
(if you want to have your own version, that is fine but
|
45
|
-
|
46
|
-
* Send me a pull request. Bonus points for topic branches
|
48
|
+
bump version in a commit by itself I can ignore when I pull)
|
49
|
+
* Send me a pull request. Bonus points for topic branches, which
|
50
|
+
make it even easier to get the related changes and nothing else.
|
47
51
|
|
48
52
|
== Copyright
|
49
53
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/lib/classy_struct.rb
CHANGED
@@ -77,15 +77,7 @@ class ClassyStruct
|
|
77
77
|
def method_missing(name, *args)
|
78
78
|
base = (name.to_s =~ /=$/) ? name.to_s[0..-2] : name
|
79
79
|
|
80
|
-
self.class.class_eval
|
81
|
-
def #{base}
|
82
|
-
@#{base}
|
83
|
-
end
|
84
|
-
|
85
|
-
def #{base}=(val)
|
86
|
-
@#{base} = val
|
87
|
-
end
|
88
|
-
EOF
|
80
|
+
self.class.class_eval "attr_accessor :#{base}"
|
89
81
|
|
90
82
|
self.class.attr_names << base.to_sym
|
91
83
|
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: classy_struct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 3
|
8
|
+
- 2
|
9
|
+
version: 0.3.2
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- amikula
|
@@ -9,19 +14,23 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date:
|
17
|
+
date: 2010-03-19 00:00:00 -07:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: rspec
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 2
|
30
|
+
- 9
|
23
31
|
version: 1.2.9
|
24
|
-
|
32
|
+
type: :development
|
33
|
+
version_requirements: *id001
|
25
34
|
description: A better-performing alternative to OpenStruct
|
26
35
|
email: amikula@gmail.com
|
27
36
|
executables: []
|
@@ -55,18 +64,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
55
64
|
requirements:
|
56
65
|
- - ">="
|
57
66
|
- !ruby/object:Gem::Version
|
67
|
+
segments:
|
68
|
+
- 0
|
58
69
|
version: "0"
|
59
|
-
version:
|
60
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
71
|
requirements:
|
62
72
|
- - ">="
|
63
73
|
- !ruby/object:Gem::Version
|
74
|
+
segments:
|
75
|
+
- 0
|
64
76
|
version: "0"
|
65
|
-
version:
|
66
77
|
requirements: []
|
67
78
|
|
68
79
|
rubyforge_project:
|
69
|
-
rubygems_version: 1.3.
|
80
|
+
rubygems_version: 1.3.6
|
70
81
|
signing_key:
|
71
82
|
specification_version: 3
|
72
83
|
summary: A better-performing alternative to OpenStruct
|