1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#!/usr/bin/ruby1.9
require '.libs/Freej'
puts "Freej class methods:"
Freej.methods(false).sort.each do |m|
puts "\t#{m.to_s}"
end
defines = Freej.constants.select{|x| Freej.const_get(x).kind_of? Fixnum}.sort
if defines.size > 0
puts "Freej Defines:"
defines.each do |c|
puts "\t #{c.to_s}"
end
end
puts "Freej Classes:"
Freej.constants.select{|x| Freej.const_get(x).kind_of? Class}.sort.each do |c|
sc = Freej.const_get(c)
puts "\t #{sc.to_s}"
m = sc.methods(false)
if m.size > 0
puts "\t\t class methods:"
m.sort.each do |im|
puts "\t\t\t #{im.to_s}"
end
end
m = sc.instance_methods(false)
if m.size > 0
puts "\t\t instance methods:"
m.sort.each do |im|
puts "\t\t\t #{im.to_s}"
end
end
end
|