class2 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes +4 -0
- data/lib/class2.rb +3 -1
- data/lib/class2/version.rb +1 -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: 1acb2d18da3e6cfb18689ecedaa0d86802107f6e
|
4
|
+
data.tar.gz: fd226407d158ca0fd0646b7cd5a7a853e9ecd7cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5ab09b2e8ff5af58b82a1cd5e65bd8035d3bf6912819a322afaca3a63c28e713869b6b88ed60dc6f39f136ede41ce5acae6f38cc6e0b472afff4f525de82f19
|
7
|
+
data.tar.gz: 7f24bcfc92a94d4ad35f7239b1299b7412ec384db2bf86b199e91bd20ee81fc7fdb008733571d4b3996b4ac233daf753d88d2a7fef41e9cbc71518c878c8c71a
|
data/Changes
CHANGED
data/lib/class2.rb
CHANGED
@@ -62,7 +62,9 @@ class Class2
|
|
62
62
|
def create_namespace(str)
|
63
63
|
str.split("::").inject(Object) do |parent, child|
|
64
64
|
# empty? to handle "::Namespace"
|
65
|
-
child.empty? ? parent : parent.
|
65
|
+
child.empty? ? parent : parent.const_defined?(child) ?
|
66
|
+
# With 2.1 we can just say Object.const_defined?(str) but keep this around for now.
|
67
|
+
parent.const_get(child) : parent.const_set(child, Module.new)
|
66
68
|
end
|
67
69
|
end
|
68
70
|
|
data/lib/class2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: class2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Skye Shaw
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|