refining 0.0.2.2 → 0.0.3

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.
Files changed (2) hide show
  1. data/lib/refining.rb +11 -11
  2. 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
- def refine_class_method (meth, &block)
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 Object
32
- def refine_instance_method (meth, &block)
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: 67
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- - 2
11
- version: 0.0.2.2
9
+ - 3
10
+ version: 0.0.3
12
11
  platform: ruby
13
12
  authors:
14
13
  - meh.