Method: Cloudenvoy::Subscriber::ClassMethods#topics

Defined in:
lib/cloudenvoy/subscriber.rb

#topicsArray<Hash>

Return the list of topics this subscriber listens to.

Returns:

  • (Array<Hash>)

    The list of subscribed topics.



103
104
105
106
107
# File 'lib/cloudenvoy/subscriber.rb', line 103

def topics
  @topics ||= [cloudenvoy_options_hash[:topic], cloudenvoy_options_hash[:topics]].flatten.compact.map do |t|
    t.is_a?(String) ? { name: t } : t
  end
end