Guest User

Untitled

a guest
Jun 22nd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. require "Set"
  2. class Vorlesung
  3. attr_reader :name
  4. def initialize(name)
  5. @name = name
  6. end
  7. def eql?(other) return true if self.equal?(other) return false if self.class != other.class return self.name.eql?(other.name)
  8. end
  9. def to_s
  10. return "#{self.class} #{name.to_s}"
  11. end
  12. def inspect
  13. return to_s
  14. end
  15. end
Add Comment
Please, Sign In to add comment