class Rx::OnErrorNotification

Represents an on_error notification to an observer.

Attributes

error[R]

Public Class Methods

new(error) click to toggle source
# File lib/rx/core/notification.rb, line 116
def initialize(error)
  @error = error
  @kind = :on_error
end

Public Instance Methods

==(other) click to toggle source
# File lib/rx/core/notification.rb, line 121
def ==(other)
  other.class == self.class && other.on_error? && error == other.error
end
Also aliased as: eql?
accept(observer) click to toggle source

Invokes the observer’s method corresponding to the notification.

# File lib/rx/core/notification.rb, line 131
def accept(observer)
  observer.on_error error
end
eql?(other)
Alias for: ==
to_s() click to toggle source
# File lib/rx/core/notification.rb, line 126
def to_s
  "on_error(#{error})"
end