Advertisement
Guest User

working porky

a guest
Jan 5th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.27 KB | None | 0 0
  1. class Porky
  2.     print "Please enter a sentence..."
  3.     user_input = gets.chomp()
  4.     user_input.downcase!
  5.     if user_input.include? "s"
  6.         user_input.gsub!(/s/, "th")
  7.     else print "you thuck again"
  8.     def intialize(user_input)
  9.         end
  10.         end
  11.         puts "Porky pig says, #{user_input}!"
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement