Class: Gitlab::Git::CrossRepo

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/git/cross_repo.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_repo, target_repo) ⇒ CrossRepo

Returns a new instance of CrossRepo.



8
9
10
11
# File 'lib/gitlab/git/cross_repo.rb', line 8

def initialize(source_repo, target_repo)
  @source_repo = source_repo
  @target_repo = target_repo
end

Instance Attribute Details

#source_repoObject (readonly)

Returns the value of attribute source_repo.



6
7
8
# File 'lib/gitlab/git/cross_repo.rb', line 6

def source_repo
  @source_repo
end

#target_repoObject (readonly)

Returns the value of attribute target_repo.



6
7
8
# File 'lib/gitlab/git/cross_repo.rb', line 6

def target_repo
  @target_repo
end

Instance Method Details

#execute(target_ref, &blk) ⇒ Object



13
14
15
# File 'lib/gitlab/git/cross_repo.rb', line 13

def execute(target_ref, &blk)
  ensuring_ref_in_source(target_ref, &blk)
end