Class: Module

Inherits:
Object show all
Defined in:
lib/opal.rb

Instance Method Summary collapse

Instance Method Details

#aboutObject



34
35
36
37
38
39
40
41
42
# File 'lib/opal.rb', line 34

def about
	if defined?(Colored)
		sc = " < " + "Module".cyan.bold
		return "-- " + self.name.cyan.bold + sc + " methods".magenta.bold + " --\n" + (self.instance_methods(false)).join("\n").green.bold.underline + "\n" +  (self.private_instance_methods(false)).join("\n").red.bold.underline + "\n-- " + self.name.cyan.bold + sc + " namespaces".magenta.bold + " --\n" + (self.constants).join("\n").blue.bold.underline
	else
		sc = " < " + "Module"
		return "-- #{self.name + sc} methods --\n" + (self.instance_methods(false)).join("\n") + "\n" +  (self.private_instance_methods(false)).join("\n") + "\n-- #{self.name + sc} namespaces --\n" + (self.constants).join("\n")
	end
end

#htdoc(lsuper = false) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/opal.rb', line 43

def htdoc(lsuper=false)
	sc = " < <strong style=\"color: cyan;\">" + "Module" + "</strong>"
	return <<EOF
<div style="background-color: black; color: white; font-family: Courier New; padding: 7px;">
-- <strong style="color: cyan;">#{self.name}</strong>#{sc} <strong style="color: magenta;">methods</strong> --
<div style="color: lime; text-decoration: underline;">
#{(self.instance_methods(false)).join("<br/>\n")}
</div>
<div style="color: red; text-decoration: underline;">
#{self.private_instance_methods(false).join("<br/>\n")}
</div>
-- <strong style="color: cyan;">#{self.name}</strong>#{sc} <strong style="color: magenta;">namespaces</strong> --
<div style="color: lightblue; text-decoration: underline;">
#{(self.constants).join("<br/>\n")}
</div>
</div>
EOF
end