Class: Fog::Google::Pubsub

Inherits:
Service
  • Object
show all
Defined in:
lib/fog/google/pubsub.rb,
lib/fog/google/pubsub/mock.rb,
lib/fog/google/pubsub/real.rb,
lib/fog/google/models/pubsub/topic.rb,
lib/fog/google/models/pubsub/topics.rb,
lib/fog/google/requests/pubsub/get_topic.rb,
lib/fog/google/models/pubsub/subscription.rb,
lib/fog/google/models/pubsub/subscriptions.rb,
lib/fog/google/requests/pubsub/list_topics.rb,
lib/fog/google/requests/pubsub/create_topic.rb,
lib/fog/google/requests/pubsub/delete_topic.rb,
lib/fog/google/requests/pubsub/publish_topic.rb,
lib/fog/google/models/pubsub/received_message.rb,
lib/fog/google/requests/pubsub/get_subscription.rb,
lib/fog/google/requests/pubsub/pull_subscription.rb,
lib/fog/google/requests/pubsub/list_subscriptions.rb,
lib/fog/google/requests/pubsub/create_subscription.rb,
lib/fog/google/requests/pubsub/delete_subscription.rb,
lib/fog/google/requests/pubsub/acknowledge_subscription.rb

Defined Under Namespace

Classes: Mock, Real, ReceivedMessage, Subscription, Subscriptions, Topic, Topics

Constant Summary collapse

GOOGLE_PUBSUB_API_VERSION =
"v1".freeze
GOOGLE_PUBSUB_BASE_URL =
"https://www.googleapis.com/pubsub".freeze
GOOGLE_PUBSUB_API_SCOPE_URLS =
%w(https://www.googleapis.com/auth/pubsub).freeze

Class Method Summary collapse

Class Method Details

.subscription_name(subscription) ⇒ String

Helper class for getting a subscription name

Parameters:

  • subscription (Subscription, #to_s)

    subscription instance or name of subscription

Returns:

  • (String)

    name of subscription



64
65
66
# File 'lib/fog/google/pubsub.rb', line 64

def self.subscription_name(subscription)
  subscription.is_a?(Subscription) ? subscription.name : subscription.to_s
end