y_support 2.0.6 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/y_support/name_magic.rb +7 -0
- data/lib/y_support/version.rb +1 -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: 79b3711ed303558aedfe7d53e3aeef0edd50bcc6
|
|
4
|
+
data.tar.gz: 791cd64df5e2a2ca3df04ee734dd27585cdb331f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0beebdc94e5ace854f9d89f9c18eb2c5cda5591a60659e65eeb49ddeb9a8aabfe4796c083fddd180c1f67257a6fb6ad25e9478f0261e43da8010b11564e21e64
|
|
7
|
+
data.tar.gz: a4535df1e3a5c7475469cbbd14aec4ed0d984169fbada2430c48499529a26dbfb07d042585d7aaa33091eb29092b1183c22cca17be6e92d31b6487b540e98fb8
|
data/lib/y_support/name_magic.rb
CHANGED
|
@@ -167,6 +167,13 @@ module NameMagic
|
|
|
167
167
|
self
|
|
168
168
|
end
|
|
169
169
|
|
|
170
|
+
# Makes the class use the namespace supplied as the argument. If no argument
|
|
171
|
+
# is given, self will be the namespace.
|
|
172
|
+
#
|
|
173
|
+
def namespace! namespc=self
|
|
174
|
+
namespc.tap { |n| define_singleton_method :namespace do n end }
|
|
175
|
+
end
|
|
176
|
+
|
|
170
177
|
# Returns the instance identified by the argument. NameError is raised, if
|
|
171
178
|
# the argument does not identify an instance. (It can be an instance name
|
|
172
179
|
# as string, symbol, or an instance itself, in which case, the instance in
|
data/lib/y_support/version.rb
CHANGED