ReactiveX/Rx.rb

View on GitHub
examples/empty.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'rx'

source = Rx::Observable.empty

subscription = source.subscribe(
    lambda {|x|
        puts 'Next: ' + x.to_s
    },
    lambda {|err|
        puts 'Error: ' + err.to_s
    },
    lambda {
        puts 'Completed'
    })

# => Completed