class Reverser
Public Class Methods
new(string)
click to toggle source
# File lib/stringstuff/reverser.rb, line 2 def initialize(string) @string = string end
Public Instance Methods
reverse()
click to toggle source
# File lib/stringstuff/reverser.rb, line 6 def reverse case @string.to_s.empty? when false @string.reverse else "You didn't give me a string, you are liar-r-r!" end end