class Google::Cloud::Env

## Google Cloud hosting environment

This library provides access to information about the application’s hosting environment if it is running on Google Cloud Platform. You can use this library to determine which Google Cloud product is hosting your application (e.g. App Engine, Kubernetes Engine), information about the Google Cloud project hosting the application, information about the virtual machine instance, authentication information, and so forth.

### Usage

Obtain an instance of the environment info with:

“‘ruby require “google/cloud/env” env = Google::Cloud.env “`

Then you can interrogate any fields using methods on the object.

“‘ruby if env.app_engine?

# App engine specific logic

end “‘

Any item that does not apply to the current environment will return nil. For example:

“‘ruby unless env.app_engine?

service = env.app_engine_service_id  # => nil

end “‘