source_methods 0.0.1 → 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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/source_methods.rb +7 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 108d83e0754a9f2f6fa0d285a060e22803b0b602a4c37eae39b3041c1103cf2a
4
- data.tar.gz: d537b323ec527d745fafe6fece1d263942d11d70393722f08153940bd41e5fbb
3
+ metadata.gz: db125047f4e363893fd0476eaa6675bd1638f57f6af922aac7b7b31068b6bc63
4
+ data.tar.gz: 5ae118e866accb0054b215a44c8862e3cb7165a4eb2ba6eb90e7199d9f9b9d17
5
5
  SHA512:
6
- metadata.gz: 8edd6d233729861c7cda45a82ab4a2ced29e1df99576e97db5014037bbd241852ae37ec79b2d4e08844188f8e8336dbb59c9b9155f445772367321e102400a31
7
- data.tar.gz: dd42ea05e3cfe31ecc1733972cbb8d16549f4b805fac981b93f891f7e929a55d14ac9a688a739bedc86f968b33416b989c6d72a87aaec012b1c8a8fa3e5decc9
6
+ metadata.gz: cd393924f4cab641f88289add3408e651e34a265770a14e11af94644c0e70bd0392db202a5ef8660cc66a180a24db2354a388e5bed10147aa96b5eff50a3375a
7
+ data.tar.gz: 4b1c9f993eb34305f7378f5129e34024b1fa87b5f6871096c61e1ff306ea5f6806209a216ace3c144696880fd510f9ce07bd3f25797dae6ba2532e11066f2adb
@@ -1,5 +1,11 @@
1
1
  class Class
2
2
  def source_methods
3
- puts 'source_methods'
3
+ parent_methods = superclass.methods
4
+ methods - parent_methods
5
+ end
6
+
7
+ def source_instance_methods
8
+ parent_methods = superclass.instance_methods
9
+ instance_methods - parent_methods
4
10
  end
5
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: source_methods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - E Alexander Liedtke
@@ -39,6 +39,6 @@ requirements: []
39
39
  rubygems_version: 3.1.4
40
40
  signing_key:
41
41
  specification_version: 4
42
- summary: A gem to return class methods only methods defined in files whose name matches
43
- the class name.
42
+ summary: Get a list of only the methods defined directly on the class, and not it's
43
+ inherited methods.
44
44
  test_files: []