Sha256: 4c6f4e373faf2e9b3677a660564a68a547c1e56bef89b129465e395e1e58a4e0
Contents?: true
Size: 926 Bytes
Versions: 1
Compression:
Stored size: 926 Bytes
Contents
module Routemaster module Client class Subscription attr_reader :subscriber, :callback, :topics, :events 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 def attributes { subscriber: @subscriber, uuid: @uuid, callback: @callback, max_events: @max_events, timeout: @timeout, topics: @topics, events: @events, } end private def _symbolize_keys(h) {}.tap do |res| h.each { |k,v| res[k.to_sym] = v } end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
routemaster-client-3.2.3 | routemaster/client/subscription.rb |