Guest User

Untitled

a guest
Oct 18th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. class String
  2.  
  3. def palindrome?
  4. return self == self.reverse
  5. end
  6.  
  7. end
  8.  
  9.  
  10.  
  11.  
  12. class User
  13.  
  14. attr_accessor :name, :email
  15.  
  16. def initialize(attributes={})
  17. @name = attributes[:name]
  18. @email = attributes[:email]
  19. end
  20.  
  21. def formatted_email
  22. return "#{@name} <#{@email}>"
  23. end
  24.  
  25.  
  26.  
  27.  
  28. end
Add Comment
Please, Sign In to add comment