class RxRuby::OnNextNotification

Represents an on_next notification to an observer.

Attributes

value[R]

Public Class Methods

new(value) click to toggle source
# File lib/rx_ruby/core/notification.rb, line 84
def initialize(value)
  @value = value
  @kind = :on_next
end

Public Instance Methods

==(other) click to toggle source
# File lib/rx_ruby/core/notification.rb, line 94
def ==(other)
  other.class == self.class && other.on_next? && value == other.value
end
Also aliased as: eql?
accept(observer) click to toggle source

Invokes the observer’s method corresponding to the notification.

# File lib/rx_ruby/core/notification.rb, line 104
def accept(observer)
  observer.on_next value
end
eql?(other)
Alias for: ==
has_value?() click to toggle source

Determines whether this notification has a value.

# File lib/rx_ruby/core/notification.rb, line 90
def has_value?
  true
end
to_s() click to toggle source
# File lib/rx_ruby/core/notification.rb, line 99
def to_s
  "on_next(#{value})"
end