Class: Qcourses::RegistrationNotification
- Inherits:
-
Object
- Object
- Qcourses::RegistrationNotification
- Defined in:
- lib/qcourses/models/postman.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
- #event_name ⇒ Object
-
#initialize(employee, event) ⇒ RegistrationNotification
constructor
A new instance of RegistrationNotification.
- #inspect ⇒ Object
Constructor Details
#initialize(employee, event) ⇒ RegistrationNotification
Returns a new instance of RegistrationNotification.
5 6 7 8 |
# File 'lib/qcourses/models/postman.rb', line 5 def initialize(employee, event) @employee = employee @event = event end |
Instance Method Details
#==(other) ⇒ Object
15 16 17 18 |
# File 'lib/qcourses/models/postman.rb', line 15 def ==(other) return false unless other.is_a? RegistrationNotification return other.employee.email == employee.email && other.event == event end |
#event_name ⇒ Object
9 10 11 |
# File 'lib/qcourses/models/postman.rb', line 9 def event_name @event.name end |
#inspect ⇒ Object
12 13 14 |
# File 'lib/qcourses/models/postman.rb', line 12 def inspect "RegistrationNotification(for: #{employee.name}, about: #{event.name})" end |