class Fog::Google::Pubsub::Subscriptions
Public Instance Methods
all()
click to toggle source
Lists all subscriptions that exist on the project.
@return [Array<Fog::Google::Pubsub::Subscription>] list of
subscriptions
# File lib/fog/google/models/pubsub/subscriptions.rb, line 14 def all data = service.list_subscriptions.body["subscriptions"] || [] load(data) end
get(subscription_name)
click to toggle source
Retrieves a subscription by name
@param subscription_name [String] name of subscription to retrieve @return [Fog::Google::Pubsub::Topic] topic found, or nil if not found
# File lib/fog/google/models/pubsub/subscriptions.rb, line 23 def get(subscription_name) subscription = service.get_subscription(subscription_name).body new(subscription) rescue Fog::Errors::NotFound nil end