Class: IronWorkerNG::Feature::Python::MergePipDependency::Feature

Inherits:
Base
  • Object
show all
Defined in:
lib/iron_worker_ng/feature/python/merge_pip_dependency.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#bundle, #container_add, #rebase

Constructor Details

#initialize(code, name, version) ⇒ Feature

Returns a new instance of Feature.



9
10
11
12
13
14
# File 'lib/iron_worker_ng/feature/python/merge_pip_dependency.rb', line 9

def initialize(code, name, version)
  super(code)

  @name = name
  @version = version
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/iron_worker_ng/feature/python/merge_pip_dependency.rb', line 6

def name
  @name
end

#versionObject (readonly)

Returns the value of attribute version.



7
8
9
# File 'lib/iron_worker_ng/feature/python/merge_pip_dependency.rb', line 7

def version
  @version
end

Instance Method Details

#build_commandObject



16
17
18
19
20
21
22
23
24
# File 'lib/iron_worker_ng/feature/python/merge_pip_dependency.rb', line 16

def build_command
  if @code.full_remote_build
    "pip '#{@name}', '#{@version}'"
  elsif @code.remote_build_command
    "dir '__build__/__pips__'"
  else
    nil
  end
end