geilitool 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92317c01927ed6875216843c822d3a895af0364e
4
- data.tar.gz: 27b12f6cb77a8c2fb3665ceac736984d505e6068
3
+ metadata.gz: 13c648cd8c7697ab52c17b4cda1445a614e2d9e4
4
+ data.tar.gz: f185241f8e0bf324ac1c2e8f842dcc1d9a2fd6e0
5
5
  SHA512:
6
- metadata.gz: f5cf1784125ac5e748e002efd1c9a97fc9279c6e82db8cb66b7c0661d73c57c316e89dd684e90b5ac3e0c4d11470ff4c8d87aaa7b0ac76803b1d36e2eadeae48
7
- data.tar.gz: 419542642ba7687aa97b23897fed86e5fd5daec5b0530ae88112546525b538cacf19eab13b21e14db09b97a6b8f115e10acfad7c787e0dab3c3326d771b26c29
6
+ metadata.gz: 1042943e08d7904ffff0bba7a758a744d90c8593abcdc11a31876a575d4ae29eff08142bd9e1f66d4cf36b77d24c2c3b249f820e256150399ca8f89f631b27eb
7
+ data.tar.gz: 519d4a1eb3d45d0348d7ee3a697b8289523dc2088d491df6543ee1fe26fc519da496a107d86355c77c77a0dc061e3e4d63879b1aa799dd0f1e07aac3a1b7b18b
data/README.md CHANGED
@@ -1,29 +1,65 @@
1
1
  # Geilitool
2
-
3
- TODO: Write a gem description
4
-
2
+
3
+ Some method in ruby such as ancestors ignore the eigeinclass, but geilitool display the eigeinclass. I do it by extending the module of Kernel.
4
+
5
5
  ## Installation
6
-
6
+
7
7
  Add this line to your application's Gemfile:
8
-
8
+
9
9
  gem 'geilitool'
10
-
10
+
11
11
  And then execute:
12
-
12
+
13
13
  $ bundle
14
-
14
+
15
15
  Or install it yourself as:
16
-
16
+
17
17
  $ gem install geilitool
18
-
18
+
19
19
  ## Usage
20
-
21
- TODO: Write usage instructions here
22
-
20
+
21
+ #### list all superclass and module included eigeinclass:
22
+ Kernel#geili_ancestors
23
+
24
+ irb(main):013:0> class A
25
+ irb(main):014:1> end
26
+ irb(main):015:0> a = A.new
27
+
28
+ irb(main):019:0> a.geili_ancestors
29
+ => [#<Class:#<A:0x007fd094045328>>, A, Object, Kernel, BasicObject]
30
+
31
+ irb(main):022:0> A.geili_ancestors
32
+ => [#<Class:A>, #<Class:Object>, #<Class:BasicObject>, Class, Module, Object, Kernel, BasicObject]
33
+
34
+ #### find out the real class of object and don't hide the eigeinclass:
35
+ Kernel#geili_class
36
+
37
+ irb(main):013:0> class A
38
+ irb(main):014:1> end
39
+ irb(main):015:0> a = A.new
40
+
41
+ irb(main):020:0> a.geili_class
42
+ => [#<Class:#<A:0x007fd094045328>>, A]
43
+
44
+ irb(main):021:0> A.geili_class
45
+ => [#<Class:A>, #<Class:Object>, #<Class:BasicObject>, Class]
46
+
47
+ #### find out which class defined the method:
48
+ Kernel#geili_defined? [method_name]
49
+
50
+ irb(main):013:0> class A
51
+ irb(main):014:1> def to_s;end
52
+ irb(main):015:1> end
53
+ irb(main):016:0> a = A.new
54
+
55
+ irb(main):016:0> a.geili_defined? :to_s
56
+ => [A, Kernel]
57
+
58
+
23
59
  ## Contributing
24
-
60
+
25
61
  1. Fork it
26
62
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
63
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
64
  4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
65
+ 5. Create new Pull Request
data/geilitool.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["homeway.xue@gmail.com"]
11
11
  spec.description = %q{A ruby library for advanced extention}
12
12
  spec.summary = %q{There is some new features, such as full ancestors included eigeinclass}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/homeway/geilitool"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -1,3 +1,3 @@
1
1
  module Geilitool
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geilitool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - homeway
@@ -54,7 +54,7 @@ files:
54
54
  - lib/geilitool.rb
55
55
  - lib/geilitool/version.rb
56
56
  - spec/kernel_spec.rb
57
- homepage: ''
57
+ homepage: https://github.com/homeway/geilitool
58
58
  licenses:
59
59
  - MIT
60
60
  metadata: {}