class Rx::ObserverConfiguration

Configuration class for storing Observer actions

Constants

DEFAULT_ON_COMPLETED
DEFAULT_ON_ERROR
DEFAULT_ON_NEXT

Attributes

on_completed_action[R]
on_error_action[R]
on_next_action[R]

Public Class Methods

new() click to toggle source
# File lib/rx/core/observer.rb, line 14
def initialize
  @on_next_action = DEFAULT_ON_NEXT
  @on_error_action = DEFAULT_ON_ERROR
  @on_completed_action = DEFAULT_ON_COMPLETED
end

Public Instance Methods

on_completed(&on_completed_action) click to toggle source
# File lib/rx/core/observer.rb, line 28
def on_completed(&on_completed_action)
  @on_completed_action = on_completed_action
end
on_error(&on_error_action) click to toggle source
# File lib/rx/core/observer.rb, line 24
def on_error(&on_error_action)
  @on_error_action = on_error_action
end
on_next(&on_next_action) click to toggle source
# File lib/rx/core/observer.rb, line 20
def on_next(&on_next_action)
  @on_next_action = on_next_action
end