class Test
Public Class Methods
new(mode="r")
click to toggle source
# File lib/regamed/test.rb, line 2 def initialize(mode="r") if mode == "r" or mode == "p" @mode = mode else puts "ERROR::Could not understand mode passed to test class\nUse r -> return the answer | p -> puts and return the answer" end end
Public Instance Methods
echo(phrase)
click to toggle source
# File lib/regamed/test.rb, line 22 def echo(phrase) if @mode == "p" puts phrase end return phrase end
hello()
click to toggle source
# File lib/regamed/test.rb, line 15 def hello if @mode == "p" puts "Hello World!" end return "Hello World!" end
ping()
click to toggle source
# File lib/regamed/test.rb, line 9 def ping if @mode == "p" puts "pong" end return "pong" end