# Cloud Debugger V2 API - Class Google::Devtools::Source::V1::SourceContext (v0.6.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.6.0 (latest)](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/latest/Google-Devtools-Source-V1-SourceContext)
- [0.5.0](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/0.5.0/Google-Devtools-Source-V1-SourceContext)
- [0.4.0](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/0.4.0/Google-Devtools-Source-V1-SourceContext)
- [0.3.5](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/0.3.5/Google-Devtools-Source-V1-SourceContext)
Reference documentation and code samples for the Cloud Debugger V2 API class Google::Devtools::Source::V1::SourceContext.

A SourceContext is a reference to a tree of files. A SourceContext together
with a path point to a unique revision of a single file or directory.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #cloud_repo

    def cloud_repo() -> ::Google::Devtools::Source::V1::CloudRepoSourceContext

**Returns**

- ([::Google::Devtools::Source::V1::CloudRepoSourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/latest/Google-Devtools-Source-V1-CloudRepoSourceContext)) --- A SourceContext referring to a revision in a cloud repo.

### #cloud_repo=

    def cloud_repo=(value) -> ::Google::Devtools::Source::V1::CloudRepoSourceContext

**Parameter**

- **value** ([::Google::Devtools::Source::V1::CloudRepoSourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/latest/Google-Devtools-Source-V1-CloudRepoSourceContext)) --- A SourceContext referring to a revision in a cloud repo.
**Returns**

- ([::Google::Devtools::Source::V1::CloudRepoSourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/latest/Google-Devtools-Source-V1-CloudRepoSourceContext)) --- A SourceContext referring to a revision in a cloud repo.

### #cloud_workspace

    def cloud_workspace() -> ::Google::Devtools::Source::V1::CloudWorkspaceSourceContext

**Returns**

- ([::Google::Devtools::Source::V1::CloudWorkspaceSourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/latest/Google-Devtools-Source-V1-CloudWorkspaceSourceContext)) --- A SourceContext referring to a snapshot in a cloud workspace.

### #cloud_workspace=

    def cloud_workspace=(value) -> ::Google::Devtools::Source::V1::CloudWorkspaceSourceContext

**Parameter**

- **value** ([::Google::Devtools::Source::V1::CloudWorkspaceSourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/latest/Google-Devtools-Source-V1-CloudWorkspaceSourceContext)) --- A SourceContext referring to a snapshot in a cloud workspace.
**Returns**

- ([::Google::Devtools::Source::V1::CloudWorkspaceSourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/latest/Google-Devtools-Source-V1-CloudWorkspaceSourceContext)) --- A SourceContext referring to a snapshot in a cloud workspace.

### #gerrit

    def gerrit() -> ::Google::Devtools::Source::V1::GerritSourceContext

**Returns**

- ([::Google::Devtools::Source::V1::GerritSourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/latest/Google-Devtools-Source-V1-GerritSourceContext)) --- A SourceContext referring to a Gerrit project.

### #gerrit=

    def gerrit=(value) -> ::Google::Devtools::Source::V1::GerritSourceContext

**Parameter**

- **value** ([::Google::Devtools::Source::V1::GerritSourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/latest/Google-Devtools-Source-V1-GerritSourceContext)) --- A SourceContext referring to a Gerrit project.
**Returns**

- ([::Google::Devtools::Source::V1::GerritSourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/latest/Google-Devtools-Source-V1-GerritSourceContext)) --- A SourceContext referring to a Gerrit project.

### #git

    def git() -> ::Google::Devtools::Source::V1::GitSourceContext

**Returns**

- ([::Google::Devtools::Source::V1::GitSourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/latest/Google-Devtools-Source-V1-GitSourceContext)) --- A SourceContext referring to any third party Git repo (e.g. GitHub).

### #git=

    def git=(value) -> ::Google::Devtools::Source::V1::GitSourceContext

**Parameter**

- **value** ([::Google::Devtools::Source::V1::GitSourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/latest/Google-Devtools-Source-V1-GitSourceContext)) --- A SourceContext referring to any third party Git repo (e.g. GitHub).
**Returns**

- ([::Google::Devtools::Source::V1::GitSourceContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-debugger-v2/latest/Google-Devtools-Source-V1-GitSourceContext)) --- A SourceContext referring to any third party Git repo (e.g. GitHub).