spelunk 0.0.1 → 0.0.2
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/spelunk.rb +12 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebfcf8cb3e4b825bb152d50f9cfaf7de5814546e
|
4
|
+
data.tar.gz: c5d635a1a217f0f6395abb0c7e62fe3ccf0ea222
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7197c413d0c7f1c48824de45ee0ab616cfe00308a84bfb7be1dcfe994eb738b936a765d2299df2d4976198a002eaef4cdfb26e0e3e704f763ac9c17dee4ffc6e
|
7
|
+
data.tar.gz: d0a468f128ec486eb3f53b8ee78742fe2ffe8d96ecd76d54c6e5d28a02250b3034a04faaf00c268ea9c90793c64dff00eb634615af7855192f42d79827784f2d
|
data/lib/spelunk.rb
CHANGED
@@ -12,6 +12,18 @@ module Spelunk
|
|
12
12
|
get_methods_for object, :"public_"
|
13
13
|
end
|
14
14
|
|
15
|
+
def self.args_for object, method
|
16
|
+
raise "Method name must be a symbol" unless method.to_sym
|
17
|
+
object.method(method).parameters
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.dump_methods_for object
|
21
|
+
methods = self.methods_for object
|
22
|
+
methods.each do |method|
|
23
|
+
p "#{object.to_s}.#{method.to_s}: #{self.args_for object, method.to_sym}"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
15
27
|
private
|
16
28
|
def self.get_methods_for object, type = :""
|
17
29
|
base_object = object.class.eql?(Kernel.const_get(object.class.to_s)) ? Object : Object.new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spelunk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Castro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Spelunk unfamiliar Objects and view only its relevant methods.
|
14
14
|
email: git@ryancastro.com
|
@@ -18,7 +18,7 @@ extra_rdoc_files: []
|
|
18
18
|
files:
|
19
19
|
- lib/spelunk.rb
|
20
20
|
- lib/spelunk/version.rb
|
21
|
-
homepage: http://github.com/
|
21
|
+
homepage: http://github.com/ryancastro/spelunk
|
22
22
|
licenses: []
|
23
23
|
metadata: {}
|
24
24
|
post_install_message:
|