Class: E2B::Services::GitBranches
- Inherits:
-
Object
- Object
- E2B::Services::GitBranches
- Defined in:
- lib/e2b/services/git.rb
Overview
Represents the branches in a git repository
Instance Attribute Summary collapse
-
#current ⇒ String?
readonly
The currently checked-out branch.
-
#local ⇒ Array<String>
readonly
List of local branch names.
-
#remote ⇒ Array<String>
readonly
List of remote branch names.
Instance Method Summary collapse
-
#initialize(current: nil, local: [], remote: []) ⇒ GitBranches
constructor
A new instance of GitBranches.
Constructor Details
#initialize(current: nil, local: [], remote: []) ⇒ GitBranches
Returns a new instance of GitBranches.
138 139 140 141 142 |
# File 'lib/e2b/services/git.rb', line 138 def initialize(current: nil, local: [], remote: []) @current = current @local = local @remote = remote end |
Instance Attribute Details
#current ⇒ String? (readonly)
Returns The currently checked-out branch.
127 128 129 |
# File 'lib/e2b/services/git.rb', line 127 def current @current end |
#local ⇒ Array<String> (readonly)
Returns List of local branch names.
130 131 132 |
# File 'lib/e2b/services/git.rb', line 130 def local @local end |
#remote ⇒ Array<String> (readonly)
Returns List of remote branch names.
133 134 135 |
# File 'lib/e2b/services/git.rb', line 133 def remote @remote end |