Class: RxRuby::OnCompletedNotification
- Inherits:
-
Object
- Object
- RxRuby::OnCompletedNotification
- Includes:
- Notification
- Defined in:
- lib/rx_ruby/core/notification.rb
Overview
Represents an on_completed notification to an observer.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
-
#accept(observer) ⇒ Object
Invokes the observer’s method corresponding to the notification.
-
#initialize ⇒ OnCompletedNotification
constructor
A new instance of OnCompletedNotification.
- #to_s ⇒ Object
Methods included from Notification
create_on_completed, create_on_error, create_on_next, #has_value?, #on_completed?, #on_error?, #on_next?, #to_observable
Constructor Details
#initialize ⇒ OnCompletedNotification
Returns a new instance of OnCompletedNotification.
141 142 143 |
# File 'lib/rx_ruby/core/notification.rb', line 141 def initialize @kind = :on_completed end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
145 146 147 |
# File 'lib/rx_ruby/core/notification.rb', line 145 def ==(other) other.class == self.class && other.on_completed? end |
#accept(observer) ⇒ Object
Invokes the observer’s method corresponding to the notification.
155 156 157 |
# File 'lib/rx_ruby/core/notification.rb', line 155 def accept(observer) observer.on_completed end |
#to_s ⇒ Object
150 151 152 |
# File 'lib/rx_ruby/core/notification.rb', line 150 def to_s "on_completed()" end |