class Routemaster::Client::Subscription
Attributes
callback[R]
events[R]
subscriber[R]
topics[R]
Public Class Methods
new(options)
click to toggle source
# File routemaster/client/subscription.rb, line 7 def initialize(options) @subscriber = options.fetch('subscriber') @uuid = options.fetch('uuid') @callback = options.fetch('callback') @max_events = options['max_events'] @timeout = options['timeout'] @topics = options.fetch('topics') @events = _symbolize_keys options.fetch('events') end
Public Instance Methods
attributes()
click to toggle source
# File routemaster/client/subscription.rb, line 17 def attributes { subscriber: @subscriber, uuid: @uuid, callback: @callback, max_events: @max_events, timeout: @timeout, topics: @topics, events: @events, } end
Private Instance Methods
_symbolize_keys(h)
click to toggle source
# File routemaster/client/subscription.rb, line 31 def _symbolize_keys(h) {}.tap do |res| h.each { |k,v| res[k.to_sym] = v } end end