desc_method 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin rdoc
|
2
|
-
|
2
|
+
add method methods2 so that it returns lists that are split into two kind of [adds a marker where the inherited methods begin].
|
3
3
|
=end
|
4
4
|
module Kernel
|
5
5
|
alias :methods_old :methods
|
6
|
-
def
|
6
|
+
def methods2 all = true
|
7
7
|
if all
|
8
8
|
# give some marker designating when the inherited methods start
|
9
9
|
(public_methods(false) << :"inherited methods after this point >>") + (public_methods(true) - public_methods(false))
|
@@ -18,7 +18,6 @@ module SourceLocationDesc
|
|
18
18
|
# TODO does this work with class methods?
|
19
19
|
def desc want_just_summary = false, want_the_description_returned = false
|
20
20
|
doc = []
|
21
|
-
#_dbg
|
22
21
|
# to_s is something like "#<Method: String#strip>"
|
23
22
|
# or #<Method: GiftCertsControllerTest(Test::Unit::TestCase)#get>
|
24
23
|
# or "#<Method: A.go>"
|
@@ -59,14 +58,6 @@ module SourceLocationDesc
|
|
59
58
|
puts "sig: #{to_s} arity: #{arity}"
|
60
59
|
# TODO add to doc, I want it before ri for now though, and only once, so not there yet :)
|
61
60
|
|
62
|
-
# now run default RI for it
|
63
|
-
begin
|
64
|
-
puts 'searching ri for ' + full_name + "..."
|
65
|
-
RDoc::RI::Driver.run [full_name, '--no-pager'] unless want_just_summary
|
66
|
-
rescue *[StandardError, SystemExit]
|
67
|
-
# not found
|
68
|
-
end
|
69
|
-
puts '(end ri)'
|
70
61
|
|
71
62
|
# now gather up any other information we now about it, in case there are no rdocs
|
72
63
|
|
@@ -121,6 +112,7 @@ module SourceLocationDesc
|
|
121
112
|
end
|
122
113
|
}
|
123
114
|
# how do I get the rest now?
|
115
|
+
already_got_ri = true
|
124
116
|
return sig + "\n" + head[0] if want_just_summary
|
125
117
|
else
|
126
118
|
doc << 'appears to be a c method'
|
@@ -134,6 +126,17 @@ module SourceLocationDesc
|
|
134
126
|
|
135
127
|
puts doc # always output it since RI does currently [todo make optional I suppose, and non out-putty]
|
136
128
|
|
129
|
+
|
130
|
+
# now run default RI for it
|
131
|
+
begin
|
132
|
+
puts 'searching ri for ' + full_name + "..."
|
133
|
+
RDoc::RI::Driver.run [full_name, '--no-pager'] unless want_just_summary
|
134
|
+
rescue *[StandardError, SystemExit]
|
135
|
+
# not found
|
136
|
+
finally
|
137
|
+
puts '(end ri)'
|
138
|
+
end unless already_got_ri
|
139
|
+
|
137
140
|
if want_the_description_returned # give them something they can examine
|
138
141
|
doc
|
139
142
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: desc_method
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roger Pack
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-03 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: "1.1"
|
34
34
|
version:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
36
|
+
name: rdp-arguments
|
37
37
|
type: :runtime
|
38
38
|
version_requirement:
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: "0"
|
44
44
|
version:
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
|
-
name:
|
46
|
+
name: sane
|
47
47
|
type: :runtime
|
48
48
|
version_requirement:
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|