rubywho 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +462 -0
- data/VERSION +1 -1
- data/rubywho.gemspec +7 -3
- data/test/advance_sample.rb +37 -0
- data/test/basic_sample.rb +21 -0
- metadata +8 -4
- data/README.rdoc +0 -19
data/README.markdown
ADDED
@@ -0,0 +1,462 @@
|
|
1
|
+
# rubywho: Who is this ruby-object?
|
2
|
+
|
3
|
+
Ruby running on the object's class hierarchy, methods of each class to display a legible.
|
4
|
+
|
5
|
+
## Basic Sample
|
6
|
+
|
7
|
+
### Code
|
8
|
+
|
9
|
+
require 'rubygems'
|
10
|
+
require 'rubywho'
|
11
|
+
|
12
|
+
# Hello.
|
13
|
+
1.who?
|
14
|
+
"string".who?
|
15
|
+
String.who?
|
16
|
+
[1, 2, 3].who?
|
17
|
+
|
18
|
+
# Method filtering.
|
19
|
+
require 'active_record'
|
20
|
+
ActiveRecord::Base.who?(/sql/)
|
21
|
+
|
22
|
+
### Result
|
23
|
+
|
24
|
+
== 1.who? ==
|
25
|
+
Fixnum#
|
26
|
+
| abs, div, divmod, even?, fdiv, id2name, modulo, odd?, power!, quo, rdiv
|
27
|
+
| rpower, size, to_f, to_s, to_sym, zero?
|
28
|
+
| %, &, *, **, +, -, -@, /, <, <<, <=, <=>, ==, >, >=, >>, [], ^, |, ~
|
29
|
+
v-------------------------------------------------------------------------------
|
30
|
+
Integer#
|
31
|
+
| ceil, chr, denominator, downto, even?, floor, gcd, gcdlcm, integer?, lcm, next
|
32
|
+
| numerator, odd?, ord, pred, round, succ, taguri, taguri=, times, to_bn, to_i
|
33
|
+
| to_int, to_r, to_yaml, truncate, upto
|
34
|
+
v-------------------------------------------------------------------------------
|
35
|
+
Precision#
|
36
|
+
| prec, prec_f, prec_i
|
37
|
+
v-------------------------------------------------------------------------------
|
38
|
+
Numeric#
|
39
|
+
| abs, ceil, coerce, div, divmod, eql?, fdiv, floor, integer?, modulo, nonzero?
|
40
|
+
| quo, remainder, round, singleton_method_added, step, to_int, truncate, zero?
|
41
|
+
| +@, -@, <=>
|
42
|
+
v-------------------------------------------------------------------------------
|
43
|
+
Comparable#
|
44
|
+
| between?
|
45
|
+
| <, <=, ==, >, >=
|
46
|
+
v-------------------------------------------------------------------------------
|
47
|
+
Object#
|
48
|
+
| taguri, taguri=, to_yaml, to_yaml_properties, to_yaml_style
|
49
|
+
v-------------------------------------------------------------------------------
|
50
|
+
Kernel#
|
51
|
+
| __id__, __send__, class, clone, display, dup, enum_for, eql?, equal?, extend
|
52
|
+
| freeze, frozen?, hash, id, inspect, instance_eval, instance_exec, instance_of?
|
53
|
+
| instance_variable_defined?, instance_variable_get, instance_variable_set
|
54
|
+
| instance_variables, is_a?, kind_of?, method, methods, nil?, object_id
|
55
|
+
| private_methods, protected_methods, public_methods, respond_to?, send
|
56
|
+
| singleton_methods, taint, tainted?, tap, to_a, to_enum, to_s, type, untaint
|
57
|
+
| ==, ===, =~
|
58
|
+
v-------------------------------------------------------------------------------
|
59
|
+
== "string".who? ==
|
60
|
+
String#
|
61
|
+
| bytes, bytesize, capitalize, capitalize!, casecmp, center, chars, chomp
|
62
|
+
| chomp!, chop, chop!, concat, count, crypt, delete, delete!, downcase
|
63
|
+
| downcase!, dump, each, each_byte, each_char, each_line, empty?, end_with?
|
64
|
+
| eql?, gsub, gsub!, hash, hex, include?, index, insert, inspect, intern
|
65
|
+
| is_binary_data?, is_complex_yaml?, length, lines, ljust, lstrip, lstrip!
|
66
|
+
| match, next, next!, oct, partition, replace, reverse, reverse!, rindex, rjust
|
67
|
+
| rpartition, rstrip, rstrip!, scan, shellescape, shellsplit, size, slice
|
68
|
+
| slice!, split, squeeze, squeeze!, start_with?, strip, strip!, sub, sub!, succ
|
69
|
+
| succ!, sum, swapcase, swapcase!, taguri, taguri=, to_f, to_i, to_s, to_str
|
70
|
+
| to_sym, to_yaml, tr, tr!, tr_s, tr_s!, unpack, upcase, upcase!, upto
|
71
|
+
| %, *, +, <<, <=>, ==, =~, [], []=
|
72
|
+
v-------------------------------------------------------------------------------
|
73
|
+
Enumerable#
|
74
|
+
| all?, any?, collect, count, cycle, detect, drop, drop_while, each_cons
|
75
|
+
| each_slice, each_with_index, entries, enum_cons, enum_slice, enum_with_index
|
76
|
+
| find, find_all, find_index, first, grep, group_by, include?, inject, map, max
|
77
|
+
| max_by, member?, min, min_by, minmax, minmax_by, none?, one?, partition
|
78
|
+
| reduce, reject, reverse_each, select, sort, sort_by, take, take_while, to_a
|
79
|
+
| zip
|
80
|
+
v-------------------------------------------------------------------------------
|
81
|
+
Comparable#
|
82
|
+
| between?
|
83
|
+
| <, <=, ==, >, >=
|
84
|
+
v-------------------------------------------------------------------------------
|
85
|
+
Object#
|
86
|
+
| taguri, taguri=, to_yaml, to_yaml_properties, to_yaml_style
|
87
|
+
v-------------------------------------------------------------------------------
|
88
|
+
Kernel#
|
89
|
+
| __id__, __send__, class, clone, display, dup, enum_for, eql?, equal?, extend
|
90
|
+
| freeze, frozen?, hash, id, inspect, instance_eval, instance_exec, instance_of?
|
91
|
+
| instance_variable_defined?, instance_variable_get, instance_variable_set
|
92
|
+
| instance_variables, is_a?, kind_of?, method, methods, nil?, object_id
|
93
|
+
| private_methods, protected_methods, public_methods, respond_to?, send
|
94
|
+
| singleton_methods, taint, tainted?, tap, to_a, to_enum, to_s, type, untaint
|
95
|
+
| ==, ===, =~
|
96
|
+
v-------------------------------------------------------------------------------
|
97
|
+
== String.who? ==
|
98
|
+
String(Class)
|
99
|
+
| yaml_new, yaml_tag_subclasses?
|
100
|
+
v-------------------------------------------------------------------------------
|
101
|
+
Enumerable(Module)
|
102
|
+
v-------------------------------------------------------------------------------
|
103
|
+
Comparable(Module)
|
104
|
+
v-------------------------------------------------------------------------------
|
105
|
+
Object(Class)
|
106
|
+
| yaml_tag_subclasses?
|
107
|
+
v-------------------------------------------------------------------------------
|
108
|
+
Kernel(Module)
|
109
|
+
| Array, Float, Integer, String, URI, __method__, abort, at_exit, autoload
|
110
|
+
| autoload?, binding, block_given?, callcc, caller, catch, chomp, chomp!, chop
|
111
|
+
| chop!, eval, exec, exit, exit!, fail, fork, format, getc, gets
|
112
|
+
| global_variables, gsub, gsub!, iterator?, lambda, load, local_variables, loop
|
113
|
+
| method_missing, open, p, print, printf, proc, putc, puts, raise, rand
|
114
|
+
| readline, readlines, require, scan, select, set_trace_func, sleep, split
|
115
|
+
| sprintf, srand, sub, sub!, syscall, system, test, throw, trace_var, trap
|
116
|
+
| untrace_var, warn
|
117
|
+
| `
|
118
|
+
v-------------------------------------------------------------------------------
|
119
|
+
== [1, 2, 3].who? ==
|
120
|
+
Array#
|
121
|
+
| assoc, at, choice, clear, collect, collect!, combination, compact, compact!
|
122
|
+
| concat, count, cycle, delete, delete_at, delete_if, drop, drop_while, each
|
123
|
+
| each_index, empty?, eql?, fetch, fill, find_index, first, flatten, flatten!
|
124
|
+
| frozen?, hash, include?, index, indexes, indices, insert, inspect, join, last
|
125
|
+
| length, map, map!, nitems, pack, permutation, pop, product, push, rassoc
|
126
|
+
| reject, reject!, replace, reverse, reverse!, reverse_each, rindex, select
|
127
|
+
| shelljoin, shift, shuffle, shuffle!, size, slice, slice!, sort, sort!, taguri
|
128
|
+
| taguri=, take, take_while, to_a, to_ary, to_s, to_yaml, transpose, uniq, uniq!
|
129
|
+
| unshift, values_at, yaml_initialize, zip
|
130
|
+
| &, *, +, -, <<, <=>, ==, [], []=, |
|
131
|
+
v-------------------------------------------------------------------------------
|
132
|
+
Enumerable#
|
133
|
+
| all?, any?, collect, count, cycle, detect, drop, drop_while, each_cons
|
134
|
+
| each_slice, each_with_index, entries, enum_cons, enum_slice, enum_with_index
|
135
|
+
| find, find_all, find_index, first, grep, group_by, include?, inject, map, max
|
136
|
+
| max_by, member?, min, min_by, minmax, minmax_by, none?, one?, partition
|
137
|
+
| reduce, reject, reverse_each, select, sort, sort_by, take, take_while, to_a
|
138
|
+
| zip
|
139
|
+
v-------------------------------------------------------------------------------
|
140
|
+
Object#
|
141
|
+
| taguri, taguri=, to_yaml, to_yaml_properties, to_yaml_style
|
142
|
+
v-------------------------------------------------------------------------------
|
143
|
+
Kernel#
|
144
|
+
| __id__, __send__, class, clone, display, dup, enum_for, eql?, equal?, extend
|
145
|
+
| freeze, frozen?, hash, id, inspect, instance_eval, instance_exec, instance_of?
|
146
|
+
| instance_variable_defined?, instance_variable_get, instance_variable_set
|
147
|
+
| instance_variables, is_a?, kind_of?, method, methods, nil?, object_id
|
148
|
+
| private_methods, protected_methods, public_methods, respond_to?, send
|
149
|
+
| singleton_methods, taint, tainted?, tap, to_a, to_enum, to_s, type, untaint
|
150
|
+
| ==, ===, =~
|
151
|
+
v-------------------------------------------------------------------------------
|
152
|
+
== ActiveRecord::Base.who? ==
|
153
|
+
ActiveRecord::Base(Class)
|
154
|
+
| count_by_sql, find_by_sql, sanitize_sql, sanitize_sql_array
|
155
|
+
| sanitize_sql_for_assignment, sanitize_sql_for_conditions, sanitize_sql_hash
|
156
|
+
| sanitize_sql_hash_for_assignment, sanitize_sql_hash_for_conditions
|
157
|
+
v-------------------------------------------------------------------------------
|
158
|
+
ActiveRecord::Aggregations(Module)
|
159
|
+
v-------------------------------------------------------------------------------
|
160
|
+
ActiveRecord::Transactions(Module)
|
161
|
+
v-------------------------------------------------------------------------------
|
162
|
+
ActiveRecord::Reflection(Module)
|
163
|
+
v-------------------------------------------------------------------------------
|
164
|
+
ActiveRecord::Serialization(Module)
|
165
|
+
v-------------------------------------------------------------------------------
|
166
|
+
ActiveModel::Serializers::Xml(Module)
|
167
|
+
v-------------------------------------------------------------------------------
|
168
|
+
ActiveModel::Serializers::JSON(Module)
|
169
|
+
v-------------------------------------------------------------------------------
|
170
|
+
ActiveModel::Serialization(Module)
|
171
|
+
v-------------------------------------------------------------------------------
|
172
|
+
ActiveRecord::AutosaveAssociation(Module)
|
173
|
+
v-------------------------------------------------------------------------------
|
174
|
+
ActiveRecord::NestedAttributes(Module)
|
175
|
+
v-------------------------------------------------------------------------------
|
176
|
+
ActiveRecord::Associations(Module)
|
177
|
+
v-------------------------------------------------------------------------------
|
178
|
+
ActiveRecord::AssociationPreload(Module)
|
179
|
+
v-------------------------------------------------------------------------------
|
180
|
+
ActiveRecord::NamedScope(Module)
|
181
|
+
v-------------------------------------------------------------------------------
|
182
|
+
ActiveModel::Validations::Callbacks(Module)
|
183
|
+
v-------------------------------------------------------------------------------
|
184
|
+
ActiveRecord::Callbacks(Module)
|
185
|
+
v-------------------------------------------------------------------------------
|
186
|
+
ActiveModel::Observing(Module)
|
187
|
+
v-------------------------------------------------------------------------------
|
188
|
+
ActiveRecord::Timestamp(Module)
|
189
|
+
v-------------------------------------------------------------------------------
|
190
|
+
ActiveModel::MassAssignmentSecurity(Module)
|
191
|
+
v-------------------------------------------------------------------------------
|
192
|
+
ActiveRecord::AttributeMethods::Dirty(Module)
|
193
|
+
v-------------------------------------------------------------------------------
|
194
|
+
ActiveModel::Dirty(Module)
|
195
|
+
v-------------------------------------------------------------------------------
|
196
|
+
ActiveRecord::AttributeMethods::TimeZoneConversion(Module)
|
197
|
+
v-------------------------------------------------------------------------------
|
198
|
+
ActiveRecord::AttributeMethods::PrimaryKey(Module)
|
199
|
+
v-------------------------------------------------------------------------------
|
200
|
+
ActiveRecord::AttributeMethods::Read(Module)
|
201
|
+
v-------------------------------------------------------------------------------
|
202
|
+
ActiveRecord::AttributeMethods::Write(Module)
|
203
|
+
v-------------------------------------------------------------------------------
|
204
|
+
ActiveRecord::AttributeMethods::BeforeTypeCast(Module)
|
205
|
+
v-------------------------------------------------------------------------------
|
206
|
+
#<Module:0x101796268>(Module)
|
207
|
+
v-------------------------------------------------------------------------------
|
208
|
+
ActiveRecord::AttributeMethods::Query(Module)
|
209
|
+
v-------------------------------------------------------------------------------
|
210
|
+
ActiveRecord::AttributeMethods(Module)
|
211
|
+
v-------------------------------------------------------------------------------
|
212
|
+
ActiveModel::AttributeMethods(Module)
|
213
|
+
v-------------------------------------------------------------------------------
|
214
|
+
ActiveRecord::Locking::Optimistic(Module)
|
215
|
+
v-------------------------------------------------------------------------------
|
216
|
+
ActiveRecord::Locking::Pessimistic(Module)
|
217
|
+
v-------------------------------------------------------------------------------
|
218
|
+
ActiveRecord::Validations(Module)
|
219
|
+
v-------------------------------------------------------------------------------
|
220
|
+
ActiveModel::Validations::HelperMethods(Module)
|
221
|
+
v-------------------------------------------------------------------------------
|
222
|
+
ActiveModel::Validations(Module)
|
223
|
+
v-------------------------------------------------------------------------------
|
224
|
+
ActiveSupport::Callbacks(Module)
|
225
|
+
v-------------------------------------------------------------------------------
|
226
|
+
ActiveModel::Conversion(Module)
|
227
|
+
v-------------------------------------------------------------------------------
|
228
|
+
ActiveRecord::Persistence(Module)
|
229
|
+
v-------------------------------------------------------------------------------
|
230
|
+
Object(Class)
|
231
|
+
v-------------------------------------------------------------------------------
|
232
|
+
JSON::Ext::Generator::GeneratorMethods::Object(Module)
|
233
|
+
v-------------------------------------------------------------------------------
|
234
|
+
ActiveSupport::Dependencies::Loadable(Module)
|
235
|
+
v-------------------------------------------------------------------------------
|
236
|
+
Arel::Sql::ObjectExtensions(Module)
|
237
|
+
v-------------------------------------------------------------------------------
|
238
|
+
Arel::ObjectExtensions(Module)
|
239
|
+
v-------------------------------------------------------------------------------
|
240
|
+
Kernel(Module)
|
241
|
+
v-------------------------------------------------------------------------------
|
242
|
+
|
243
|
+
## Advance Sample
|
244
|
+
|
245
|
+
### Code
|
246
|
+
|
247
|
+
require 'rubygems'
|
248
|
+
require 'rubywho'
|
249
|
+
|
250
|
+
# Filtering
|
251
|
+
1.who?("to_")
|
252
|
+
|
253
|
+
# Limit disp level.
|
254
|
+
1.who?(nil, 3)
|
255
|
+
|
256
|
+
# Shortcut.
|
257
|
+
1.who1?
|
258
|
+
puts "== who0? display 1-line. =="
|
259
|
+
1.who0?
|
260
|
+
|
261
|
+
# Force display instance_method.
|
262
|
+
1.who_instance?
|
263
|
+
Fixnum.who_i?
|
264
|
+
|
265
|
+
# Force display singleton_method.
|
266
|
+
1.who_singleton?
|
267
|
+
Fixnum.who_s?
|
268
|
+
|
269
|
+
# Method chain.
|
270
|
+
puts "== who0? method chain. =="
|
271
|
+
[1, "cat", "cat", 2, "cat", 3].who0?.select{|i| i == 'cat'}.who0?.count.who0?
|
272
|
+
|
273
|
+
### Result
|
274
|
+
|
275
|
+
== 1.who? ==
|
276
|
+
Fixnum#
|
277
|
+
| to_f, to_s, to_sym
|
278
|
+
v-------------------------------------------------------------------------------
|
279
|
+
Integer#
|
280
|
+
| to_bn, to_i, to_int, to_r, to_yaml
|
281
|
+
v-------------------------------------------------------------------------------
|
282
|
+
Precision#
|
283
|
+
v-------------------------------------------------------------------------------
|
284
|
+
Numeric#
|
285
|
+
| to_int
|
286
|
+
v-------------------------------------------------------------------------------
|
287
|
+
Comparable#
|
288
|
+
v-------------------------------------------------------------------------------
|
289
|
+
Object#
|
290
|
+
| to_yaml, to_yaml_properties, to_yaml_style
|
291
|
+
v-------------------------------------------------------------------------------
|
292
|
+
Kernel#
|
293
|
+
| to_a, to_enum, to_s
|
294
|
+
v-------------------------------------------------------------------------------
|
295
|
+
== 1.who? ==
|
296
|
+
Fixnum#
|
297
|
+
| abs, div, divmod, even?, fdiv, id2name, modulo, odd?, power!, quo, rdiv
|
298
|
+
| rpower, size, to_f, to_s, to_sym, zero?
|
299
|
+
| %, &, *, **, +, -, -@, /, <, <<, <=, <=>, ==, >, >=, >>, [], ^, |, ~
|
300
|
+
v-------------------------------------------------------------------------------
|
301
|
+
Integer#
|
302
|
+
| ceil, chr, denominator, downto, even?, floor, gcd, gcdlcm, integer?, lcm, next
|
303
|
+
| numerator, odd?, ord, pred, round, succ, taguri, taguri=, times, to_bn, to_i
|
304
|
+
| to_int, to_r, to_yaml, truncate, upto
|
305
|
+
v-------------------------------------------------------------------------------
|
306
|
+
Precision#
|
307
|
+
| prec, prec_f, prec_i
|
308
|
+
v-------------------------------------------------------------------------------
|
309
|
+
== 1.who? ==
|
310
|
+
Fixnum#
|
311
|
+
| abs, div, divmod, even?, fdiv, id2name, modulo, odd?, power!, quo, rdiv
|
312
|
+
| rpower, size, to_f, to_s, to_sym, zero?
|
313
|
+
| %, &, *, **, +, -, -@, /, <, <<, <=, <=>, ==, >, >=, >>, [], ^, |, ~
|
314
|
+
v-------------------------------------------------------------------------------
|
315
|
+
== who0? display 1-line. ==
|
316
|
+
1 #: Fixnum#
|
317
|
+
== 1.who? ==
|
318
|
+
Fixnum#
|
319
|
+
| abs, div, divmod, even?, fdiv, id2name, modulo, odd?, power!, quo, rdiv
|
320
|
+
| rpower, size, to_f, to_s, to_sym, zero?
|
321
|
+
| %, &, *, **, +, -, -@, /, <, <<, <=, <=>, ==, >, >=, >>, [], ^, |, ~
|
322
|
+
v-------------------------------------------------------------------------------
|
323
|
+
Integer#
|
324
|
+
| ceil, chr, denominator, downto, even?, floor, gcd, gcdlcm, integer?, lcm, next
|
325
|
+
| numerator, odd?, ord, pred, round, succ, taguri, taguri=, times, to_bn, to_i
|
326
|
+
| to_int, to_r, to_yaml, truncate, upto
|
327
|
+
v-------------------------------------------------------------------------------
|
328
|
+
Precision#
|
329
|
+
| prec, prec_f, prec_i
|
330
|
+
v-------------------------------------------------------------------------------
|
331
|
+
Numeric#
|
332
|
+
| abs, ceil, coerce, div, divmod, eql?, fdiv, floor, integer?, modulo, nonzero?
|
333
|
+
| quo, remainder, round, singleton_method_added, step, to_int, truncate, zero?
|
334
|
+
| +@, -@, <=>
|
335
|
+
v-------------------------------------------------------------------------------
|
336
|
+
Comparable#
|
337
|
+
| between?
|
338
|
+
| <, <=, ==, >, >=
|
339
|
+
v-------------------------------------------------------------------------------
|
340
|
+
Object#
|
341
|
+
| taguri, taguri=, to_yaml, to_yaml_properties, to_yaml_style
|
342
|
+
v-------------------------------------------------------------------------------
|
343
|
+
Kernel#
|
344
|
+
| __id__, __send__, class, clone, display, dup, enum_for, eql?, equal?, extend
|
345
|
+
| freeze, frozen?, hash, id, inspect, instance_eval, instance_exec, instance_of?
|
346
|
+
| instance_variable_defined?, instance_variable_get, instance_variable_set
|
347
|
+
| instance_variables, is_a?, kind_of?, method, methods, nil?, object_id
|
348
|
+
| private_methods, protected_methods, public_methods, respond_to?, send
|
349
|
+
| singleton_methods, taint, tainted?, tap, to_a, to_enum, to_s, type, untaint
|
350
|
+
| ==, ===, =~
|
351
|
+
v-------------------------------------------------------------------------------
|
352
|
+
== Fixnum.who? ==
|
353
|
+
Fixnum#
|
354
|
+
| abs, div, divmod, even?, fdiv, id2name, modulo, odd?, power!, quo, rdiv
|
355
|
+
| rpower, size, to_f, to_s, to_sym, zero?
|
356
|
+
| %, &, *, **, +, -, -@, /, <, <<, <=, <=>, ==, >, >=, >>, [], ^, |, ~
|
357
|
+
v-------------------------------------------------------------------------------
|
358
|
+
Integer#
|
359
|
+
| ceil, chr, denominator, downto, even?, floor, gcd, gcdlcm, integer?, lcm, next
|
360
|
+
| numerator, odd?, ord, pred, round, succ, taguri, taguri=, times, to_bn, to_i
|
361
|
+
| to_int, to_r, to_yaml, truncate, upto
|
362
|
+
v-------------------------------------------------------------------------------
|
363
|
+
Precision#
|
364
|
+
| prec, prec_f, prec_i
|
365
|
+
v-------------------------------------------------------------------------------
|
366
|
+
Numeric#
|
367
|
+
| abs, ceil, coerce, div, divmod, eql?, fdiv, floor, integer?, modulo, nonzero?
|
368
|
+
| quo, remainder, round, singleton_method_added, step, to_int, truncate, zero?
|
369
|
+
| +@, -@, <=>
|
370
|
+
v-------------------------------------------------------------------------------
|
371
|
+
Comparable#
|
372
|
+
| between?
|
373
|
+
| <, <=, ==, >, >=
|
374
|
+
v-------------------------------------------------------------------------------
|
375
|
+
Object#
|
376
|
+
| taguri, taguri=, to_yaml, to_yaml_properties, to_yaml_style
|
377
|
+
v-------------------------------------------------------------------------------
|
378
|
+
Kernel#
|
379
|
+
| __id__, __send__, class, clone, display, dup, enum_for, eql?, equal?, extend
|
380
|
+
| freeze, frozen?, hash, id, inspect, instance_eval, instance_exec, instance_of?
|
381
|
+
| instance_variable_defined?, instance_variable_get, instance_variable_set
|
382
|
+
| instance_variables, is_a?, kind_of?, method, methods, nil?, object_id
|
383
|
+
| private_methods, protected_methods, public_methods, respond_to?, send
|
384
|
+
| singleton_methods, taint, tainted?, tap, to_a, to_enum, to_s, type, untaint
|
385
|
+
| ==, ===, =~
|
386
|
+
v-------------------------------------------------------------------------------
|
387
|
+
== 1.who? ==
|
388
|
+
Fixnum(Class)
|
389
|
+
| induced_from
|
390
|
+
v-------------------------------------------------------------------------------
|
391
|
+
Integer(Class)
|
392
|
+
| induced_from, yaml_tag_subclasses?
|
393
|
+
v-------------------------------------------------------------------------------
|
394
|
+
Precision(Module)
|
395
|
+
| included
|
396
|
+
v-------------------------------------------------------------------------------
|
397
|
+
Numeric(Class)
|
398
|
+
v-------------------------------------------------------------------------------
|
399
|
+
Comparable(Module)
|
400
|
+
v-------------------------------------------------------------------------------
|
401
|
+
Object(Class)
|
402
|
+
| yaml_tag_subclasses?
|
403
|
+
v-------------------------------------------------------------------------------
|
404
|
+
Kernel(Module)
|
405
|
+
| Array, Float, Integer, String, URI, __method__, abort, at_exit, autoload
|
406
|
+
| autoload?, binding, block_given?, callcc, caller, catch, chomp, chomp!, chop
|
407
|
+
| chop!, eval, exec, exit, exit!, fail, fork, format, getc, gets
|
408
|
+
| global_variables, gsub, gsub!, iterator?, lambda, load, local_variables, loop
|
409
|
+
| method_missing, open, p, print, printf, proc, putc, puts, raise, rand
|
410
|
+
| readline, readlines, require, scan, select, set_trace_func, sleep, split
|
411
|
+
| sprintf, srand, sub, sub!, syscall, system, test, throw, trace_var, trap
|
412
|
+
| untrace_var, warn
|
413
|
+
| `
|
414
|
+
v-------------------------------------------------------------------------------
|
415
|
+
== Fixnum.who? ==
|
416
|
+
Fixnum(Class)
|
417
|
+
| induced_from
|
418
|
+
v-------------------------------------------------------------------------------
|
419
|
+
Integer(Class)
|
420
|
+
| induced_from, yaml_tag_subclasses?
|
421
|
+
v-------------------------------------------------------------------------------
|
422
|
+
Precision(Module)
|
423
|
+
| included
|
424
|
+
v-------------------------------------------------------------------------------
|
425
|
+
Numeric(Class)
|
426
|
+
v-------------------------------------------------------------------------------
|
427
|
+
Comparable(Module)
|
428
|
+
v-------------------------------------------------------------------------------
|
429
|
+
Object(Class)
|
430
|
+
| yaml_tag_subclasses?
|
431
|
+
v-------------------------------------------------------------------------------
|
432
|
+
Kernel(Module)
|
433
|
+
| Array, Float, Integer, String, URI, __method__, abort, at_exit, autoload
|
434
|
+
| autoload?, binding, block_given?, callcc, caller, catch, chomp, chomp!, chop
|
435
|
+
| chop!, eval, exec, exit, exit!, fail, fork, format, getc, gets
|
436
|
+
| global_variables, gsub, gsub!, iterator?, lambda, load, local_variables, loop
|
437
|
+
| method_missing, open, p, print, printf, proc, putc, puts, raise, rand
|
438
|
+
| readline, readlines, require, scan, select, set_trace_func, sleep, split
|
439
|
+
| sprintf, srand, sub, sub!, syscall, system, test, throw, trace_var, trap
|
440
|
+
| untrace_var, warn
|
441
|
+
| `
|
442
|
+
v-------------------------------------------------------------------------------
|
443
|
+
== who0? method chain. ==
|
444
|
+
[1, "cat", "cat", 2, "cat", 3] #: Array#
|
445
|
+
["cat", "cat", "cat"] #: Array#
|
446
|
+
3 #: Fixnum#
|
447
|
+
|
448
|
+
## Contributing to rubywho
|
449
|
+
|
450
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
451
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
452
|
+
* Fork the project
|
453
|
+
* Start a feature/bugfix branch
|
454
|
+
* Commit and push until you are happy with your contribution
|
455
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
456
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
457
|
+
|
458
|
+
## Copyright
|
459
|
+
|
460
|
+
Copyright (c) 2011 ongaeshi. See LICENSE.txt for
|
461
|
+
further details.
|
462
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/rubywho.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rubywho}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["ongaeshi"]
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"ChangeLog.markdown",
|
17
17
|
"LICENSE.txt",
|
18
|
-
"README.
|
18
|
+
"README.markdown"
|
19
19
|
]
|
20
20
|
s.files = [
|
21
21
|
".document",
|
@@ -23,11 +23,13 @@ Gem::Specification.new do |s|
|
|
23
23
|
"Gemfile",
|
24
24
|
"Gemfile.lock",
|
25
25
|
"LICENSE.txt",
|
26
|
-
"README.
|
26
|
+
"README.markdown",
|
27
27
|
"Rakefile",
|
28
28
|
"VERSION",
|
29
29
|
"lib/rubywho.rb",
|
30
30
|
"rubywho.gemspec",
|
31
|
+
"test/advance_sample.rb",
|
32
|
+
"test/basic_sample.rb",
|
31
33
|
"test/helper.rb",
|
32
34
|
"test/test_rubywho.rb"
|
33
35
|
]
|
@@ -37,6 +39,8 @@ Gem::Specification.new do |s|
|
|
37
39
|
s.rubygems_version = %q{1.3.6}
|
38
40
|
s.summary = %q{Ruby running on the object's class hierarchy, methods of each class to display a legible.}
|
39
41
|
s.test_files = [
|
42
|
+
"test/advance_sample.rb",
|
43
|
+
"test/basic_sample.rb",
|
40
44
|
"test/helper.rb",
|
41
45
|
"test/test_rubywho.rb"
|
42
46
|
]
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# @file
|
4
|
+
# @brief
|
5
|
+
# @author ongaeshi
|
6
|
+
# @date 2011/03/10
|
7
|
+
|
8
|
+
require 'rubygems'
|
9
|
+
require 'rubywho'
|
10
|
+
|
11
|
+
# Filtering
|
12
|
+
1.who?("to_")
|
13
|
+
|
14
|
+
# Limit disp level.
|
15
|
+
1.who?(nil, 3)
|
16
|
+
|
17
|
+
# Shortcut.
|
18
|
+
1.who1?
|
19
|
+
puts "== who0? display 1-line. =="
|
20
|
+
1.who0?
|
21
|
+
|
22
|
+
# Force display instance_method.
|
23
|
+
1.who_instance?
|
24
|
+
Fixnum.who_i?
|
25
|
+
|
26
|
+
# Force display singleton_method.
|
27
|
+
1.who_singleton?
|
28
|
+
Fixnum.who_s?
|
29
|
+
|
30
|
+
# Method chain.
|
31
|
+
puts "== who0? method chain. =="
|
32
|
+
[1, "cat", "cat", 2, "cat", 3].who0?.select{|i| i == 'cat'}.who0?.count.who0?
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# @file
|
4
|
+
# @brief
|
5
|
+
# @author ongaeshi
|
6
|
+
# @date 2011/03/10
|
7
|
+
|
8
|
+
require 'rubygems'
|
9
|
+
require 'rubywho'
|
10
|
+
|
11
|
+
# Hello.
|
12
|
+
1.who?
|
13
|
+
"string".who?
|
14
|
+
String.who?
|
15
|
+
[1, 2, 3].who?
|
16
|
+
|
17
|
+
# Method filtering.
|
18
|
+
require 'active_record'
|
19
|
+
ActiveRecord::Base.who?(/sql/)
|
20
|
+
|
21
|
+
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 3
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- ongaeshi
|
@@ -66,18 +66,20 @@ extensions: []
|
|
66
66
|
extra_rdoc_files:
|
67
67
|
- ChangeLog.markdown
|
68
68
|
- LICENSE.txt
|
69
|
-
- README.
|
69
|
+
- README.markdown
|
70
70
|
files:
|
71
71
|
- .document
|
72
72
|
- ChangeLog.markdown
|
73
73
|
- Gemfile
|
74
74
|
- Gemfile.lock
|
75
75
|
- LICENSE.txt
|
76
|
-
- README.
|
76
|
+
- README.markdown
|
77
77
|
- Rakefile
|
78
78
|
- VERSION
|
79
79
|
- lib/rubywho.rb
|
80
80
|
- rubywho.gemspec
|
81
|
+
- test/advance_sample.rb
|
82
|
+
- test/basic_sample.rb
|
81
83
|
- test/helper.rb
|
82
84
|
- test/test_rubywho.rb
|
83
85
|
has_rdoc: true
|
@@ -111,5 +113,7 @@ signing_key:
|
|
111
113
|
specification_version: 3
|
112
114
|
summary: Ruby running on the object's class hierarchy, methods of each class to display a legible.
|
113
115
|
test_files:
|
116
|
+
- test/advance_sample.rb
|
117
|
+
- test/basic_sample.rb
|
114
118
|
- test/helper.rb
|
115
119
|
- test/test_rubywho.rb
|
data/README.rdoc
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
= rubywho
|
2
|
-
|
3
|
-
Ruby running on the object's class hierarchy, methods of each class to display a legible.
|
4
|
-
|
5
|
-
== Contributing to rubywho
|
6
|
-
|
7
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
8
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
9
|
-
* Fork the project
|
10
|
-
* Start a feature/bugfix branch
|
11
|
-
* Commit and push until you are happy with your contribution
|
12
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
-
|
15
|
-
== Copyright
|
16
|
-
|
17
|
-
Copyright (c) 2011 ongaeshi. See LICENSE.txt for
|
18
|
-
further details.
|
19
|
-
|