Module: Reacto::Subscriptions
- Defined in:
- lib/reacto/subscriptions.rb,
lib/reacto/subscriptions/subscription.rb,
lib/reacto/subscriptions/inner_subscription.rb,
lib/reacto/subscriptions/simple_subscription.rb,
lib/reacto/subscriptions/subscription_wrapper.rb,
lib/reacto/subscriptions/tracker_subscription.rb,
lib/reacto/subscriptions/zipping_subscription.rb,
lib/reacto/subscriptions/buffered_subscription.rb,
lib/reacto/subscriptions/executor_subscription.rb,
lib/reacto/subscriptions/flat_map_subscription.rb,
lib/reacto/subscriptions/combining_subscription.rb,
lib/reacto/subscriptions/composite_subscription.rb,
lib/reacto/subscriptions/operation_subscription.rb,
lib/reacto/subscriptions/combining_last_subscription.rb
Defined Under Namespace
Modules: Subscription
Classes: BufferedSubscription, CombiningLastSubscription, CombiningSubscription, CompositeSubscription, ExecutorSubscription, FlatMapSubscription, InnerSubscription, OperationSubscription, SimpleSubscription, SubscriptionWrapper, TrackerSubscription, ZippingSubscription
Class Method Summary
collapse
Class Method Details
.on_close(&block) ⇒ Object
17
18
19
|
# File 'lib/reacto/subscriptions.rb', line 17
def on_close(&block)
SimpleSubscription.new(close: block)
end
|
.on_close_and_error(&block) ⇒ Object
21
22
23
24
25
26
|
# File 'lib/reacto/subscriptions.rb', line 21
def on_close_and_error(&block)
SimpleSubscription.new(
close: -> () { block.call },
error: -> (_e) { block.call }
)
end
|
.shared_subscription(trackable) ⇒ Object
28
29
30
|
# File 'lib/reacto/subscriptions.rb', line 28
def shared_subscription(trackable)
SimpleSubscription.new
end
|