structure 0.27.7 → 0.27.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/structure.rb +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87ccc13eb4c4c3ebb122b04e5c90c499c7e3a840
|
4
|
+
data.tar.gz: a642d9034c315181ff036020e24446cc99814e10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdfb94870cf3cc49631f0ae1daec590cbae633944e8753857e57440849e6ea85c9119fd4005cf4e438b6f4749677fce5b93204140b09c0c19200217fca62e9bd
|
7
|
+
data.tar.gz: a8b143921b69c92d6ef49cf3853e9ce3f5381bcc6ee9d2637e2dcf6db7f16161ce9190cbb0b197f983e4b2a4be164bde283801d4ea84834274f25440a0d8c45a
|
data/structure.rb
CHANGED
@@ -18,7 +18,7 @@ module Structure
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def inspect
|
21
|
-
class_name = self.class.name || self.class.to_s.
|
21
|
+
class_name = self.class.name || self.class.to_s.gsub(/[^\w:]/, '')
|
22
22
|
|
23
23
|
"#<#{class_name} #{
|
24
24
|
attributes
|
@@ -55,6 +55,11 @@ module Structure
|
|
55
55
|
|
56
56
|
klass.module_eval(&blk) if block_given?
|
57
57
|
|
58
|
+
included_modules.each do |m|
|
59
|
+
next if m == Structure
|
60
|
+
klass.send(:include, m) unless klass.include?(m)
|
61
|
+
end
|
62
|
+
|
58
63
|
attribute_names.each do |name|
|
59
64
|
if instance_methods(false).include?(:"#{name}?")
|
60
65
|
klass.module_eval "def #{name}?; #{name}; end"
|