Class: Object

Inherits:
BasicObject
Defined in:
lib/opal.rb

Overview

This is the main file for Opal.

Instance Method Summary collapse

Instance Method Details

#aboutObject



5
6
7
8
9
10
11
# File 'lib/opal.rb', line 5

def about
	if defined?(Colored)
		return "-- " + self.class.name.cyan.bold + " methods".magenta.bold + " --\n" + self.methods(false).join("\n").green.bold.underline + "\n" + self.private_methods(false).join("\n").red.bold.underline
	else
		return "-- #{self.class.name} methods --\n" + self.methods(false).join("\n") + "\n" +  self.private_methods(false).join("\n")
	end
end

#htdocObject



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/opal.rb', line 12

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

#meObject



28
29
30
# File 'lib/opal.rb', line 28

def me
	self
end

#oidbObject



25
26
27
# File 'lib/opal.rb', line 25

def oidb
	puts self.about
end