Guest User

Untitled

a guest
Nov 18th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. class ConfigureShit
  2. attr_reader :name, :email
  3.  
  4. def configure_shit(&configure_block)
  5. configure_block.call
  6. end
  7. def set_name(argument)
  8. @name = argument
  9. end
  10. def set_email(argument)
  11. @email = argument
  12. end
  13. end
  14. class ConfigureSubclass < ConfigureShit
  15. def initialize
  16. configure_shit {
  17. set_name "dermot"
  18. set_email "hderms@gmail.com"
  19. }
  20. end
  21. end
  22. rb = ConfigureSubclass.new
  23. puts rb.name
Add Comment
Please, Sign In to add comment