Class: PubsubClient::NullSubscriber::NullResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/pubsub_client/null_subscriber.rb

Overview

This adds a subset of the available methods on the Google::Cloud::PubSub::ReceivedMessage, which is what gets yielded by the subscription when configuring the listener. For a list of methods, see the following link: googleapis.dev/ruby/google-cloud-pubsub/latest/Google/Cloud/PubSub/ReceivedMessage.html

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#acknowledge!Object

Returns the value of attribute acknowledge!

Returns:

  • (Object)

    the current value of acknowledge!



11
12
13
# File 'lib/pubsub_client/null_subscriber.rb', line 11

def acknowledge!
  @acknowledge!
end

Instance Method Details

#dataObject



12
13
14
# File 'lib/pubsub_client/null_subscriber.rb', line 12

def data
  '{"key":"value"}'
end

#published_atObject



16
17
18
# File 'lib/pubsub_client/null_subscriber.rb', line 16

def published_at
  Time.now
end