structure 0.28.2 → 0.28.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/structure.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d880d2f652bb1b6d883a586f69079f76803fb66b
|
4
|
+
data.tar.gz: cac8fb4496f4fc1980b3cacb3a138dbb1a2a0528
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55849fa9ee47d40adb5c0659cdec68e21276e7609ec8b2c09a3819eafbc2345c6ca65c30dcfcfbf617c8e61199c345a7a981d556cf13a00e807c3bcbcbe25aa0
|
7
|
+
data.tar.gz: 12c3f3e2f1196a01be5cfb040e973a5f683e5c138fe9bc53e6b907d5d449d17769fd47f2420ef278c30a3d75905577e1f5855f261d0f539b6a0321bd96906fc4
|
data/structure.rb
CHANGED
@@ -74,11 +74,13 @@ module Structure
|
|
74
74
|
def attribute(name, &blk)
|
75
75
|
name = name.to_s
|
76
76
|
module_eval "def #{name}?; #{name}; end" if name.chomp!('?')
|
77
|
-
module_eval "def #{name}; @#{name}
|
77
|
+
module_eval "def #{name}; return @#{name} if defined?(@#{name}); @#{name} = _#{name}.freeze; end"
|
78
78
|
define_method("_#{name}", blk)
|
79
79
|
private "_#{name}"
|
80
80
|
|
81
81
|
@attribute_names << name
|
82
|
+
|
83
|
+
name.to_sym
|
82
84
|
end
|
83
85
|
end
|
84
86
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: structure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.28.
|
4
|
+
version: 0.28.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hakan Ensari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: me@hakanensari.com
|