5
# ----- Object creation -----
7
# Print out the value of some enums
8
print "*** color ***\n"
9
print " RED = #{Example::RED}\n"
10
print " BLUE = #{Example::BLUE}\n"
11
print " GREEN = #{Example::GREEN}\n"
13
print "\n*** Foo::speed ***\n"
14
print " Foo::IMPULSE = #{Example::Foo::IMPULSE}\n"
15
print " Foo::WARP = #{Example::Foo::WARP}\n"
16
print " Foo::LUDICROUS = #{Example::Foo::LUDICROUS}\n"
18
print "\nTesting use of enums with functions\n\n"
20
Example::enum_test(Example::RED, Example::Foo::IMPULSE)
21
Example::enum_test(Example::BLUE, Example::Foo::WARP)
22
Example::enum_test(Example::GREEN, Example::Foo::LUDICROUS)
23
Example::enum_test(1234, 5678)
25
print "\nTesting use of enum with class method\n"
26
f = Example::Foo.new()
28
f.enum_test(Example::Foo::IMPULSE)
29
f.enum_test(Example::Foo::WARP)
30
f.enum_test(Example::Foo::LUDICROUS)