deliveroo/routemaster-client

View on GitHub
routemaster/client/topic.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Routemaster
  module Client
    class Topic

      attr_reader :name, :publisher, :events

      def initialize(options)
        @name      = options.fetch('name')
        @publisher = options.fetch('publisher')
        @events    = options.fetch('events')
      end

      def attributes
        { name: @name, publisher: @publisher, events: @events }
      end

    end
  end

  # For backwards compatibility (TODO: remove in v4)
  Topic = Client::Topic
end