Class: Rugged::Branch

### Home Classes Methods

### In Files

- lib/rugged/branch.rb

### Parent

Rugged::Reference

### Methods

- #==
- #remote

### Class/Module Index

Quicksearch

- Rugged
- Rugged::Branch
- Rugged::Commit
- Rugged::Credentials
- Rugged::Credentials::Default
- Rugged::Credentials::SshKey
- Rugged::Credentials::SshKeyFromAgent
- Rugged::Credentials::UserPassword
- Rugged::Diff
- Rugged::Diff::Delta
- Rugged::Diff::Hunk
- Rugged::Diff::Line
- Rugged::Index
- Rugged::Object
- Rugged::Patch
- Rugged::Reference
- Rugged::Remote
- Rugged::Repository
- Rugged::Tag
- Rugged::Tag::Annotation
- Rugged::Tree
- Rugged::Walker
- Object

No matching classes.

# Rugged::Branch

### Public Instance Methods

==(other) click to toggle source

    # File lib/rugged/branch.rb, line 3
    def ==(other)
      other.instance_of?(Rugged::Branch) &&
        other.canonical_name == self.canonical_name
    end

remote() click to toggle source

Get the remote the branch belongs to.

If the branch is remote returns the remote it belongs to. In case of local branch, it returns the remote of the branch it tracks or nil if there is no tracking branch.

    # File lib/rugged/branch.rb, line 14
    def remote
      remote_name = self.remote_name
      @owner.remotes[remote_name] if remote_name
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.