refining 0.0.2.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/refining.rb +11 -11
- metadata +3 -4
data/lib/refining.rb
CHANGED
@@ -10,6 +10,14 @@
|
|
10
10
|
# 0. You just DO WHAT THE FUCK YOU WANT TO.
|
11
11
|
#++
|
12
12
|
|
13
|
+
class Object
|
14
|
+
def refine_singleton_method (meth, &block)
|
15
|
+
class << self
|
16
|
+
self
|
17
|
+
end.refine_method meth, &block
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
13
21
|
class Module
|
14
22
|
def refine_method (meth, &block)
|
15
23
|
return unless block
|
@@ -21,17 +29,9 @@ class Module
|
|
21
29
|
}
|
22
30
|
end
|
23
31
|
|
24
|
-
|
25
|
-
class << self
|
26
|
-
self
|
27
|
-
end.refine_method meth, &block
|
28
|
-
end; alias refine_module_method refine_class_method
|
32
|
+
alias refine_module_method refine_singleton_method
|
29
33
|
end
|
30
34
|
|
31
|
-
class
|
32
|
-
|
33
|
-
class << self
|
34
|
-
self
|
35
|
-
end.refine_method meth, &block
|
36
|
-
end
|
35
|
+
class Class
|
36
|
+
alias refine_class_method refine_singleton_method
|
37
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refining
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
|
11
|
-
version: 0.0.2.2
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- meh.
|