Module: Subserver::Pubsub
- Defined in:
- lib/subserver/pubsub.rb
Class Method Summary collapse
Class Method Details
.client ⇒ Object
5 6 7 |
# File 'lib/subserver/pubsub.rb', line 5 def self.client defined?(@client) ? @client : initialize_client end |
.client=(client) ⇒ Object
9 10 11 |
# File 'lib/subserver/pubsub.rb', line 9 def self.client=(client) @client = client end |
.initialize_client ⇒ Object
13 14 15 16 17 18 |
# File 'lib/subserver/pubsub.rb', line 13 def self.initialize_client @client = Google::Cloud::Pubsub.new( project_id: [:project_id] || ENV['PUBSUB_PROJECT_ID'], credentials: ( File.([:credentials]) if [:credentials] ) ) end |
.options ⇒ Object
20 21 22 |
# File 'lib/subserver/pubsub.rb', line 20 def self. Subserver. end |