Class: Gitlab::DependencyLinker::Package

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/dependency_linker/package.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, git_ref, github_ref) ⇒ Package

Returns a new instance of Package.


8
9
10
11
12
# File 'lib/gitlab/dependency_linker/package.rb', line 8

def initialize(name, git_ref, github_ref)
  @name = name
  @git_ref = git_ref
  @github_ref = github_ref
end

Instance Attribute Details

#git_refObject (readonly)

Returns the value of attribute git_ref


6
7
8
# File 'lib/gitlab/dependency_linker/package.rb', line 6

def git_ref
  @git_ref
end

#github_refObject (readonly)

Returns the value of attribute github_ref


6
7
8
# File 'lib/gitlab/dependency_linker/package.rb', line 6

def github_ref
  @github_ref
end

#nameObject (readonly)

Returns the value of attribute name


6
7
8
# File 'lib/gitlab/dependency_linker/package.rb', line 6

def name
  @name
end

Instance Method Details

#external_refObject


14
15
16
# File 'lib/gitlab/dependency_linker/package.rb', line 14

def external_ref
  @git_ref || @github_ref
end