Class: Fig::Package::Override

Inherits:
Object
  • Object
show all
Includes:
Statement
Defined in:
lib/fig/package/override.rb

Overview

Overrides one package version dependency with another in an include statement.

include blah/1.2.3 override somedependency/3.2.6

indicates that, regardless of which version of somedependency the blah package says it needs, the blah package will actually use v3.2.6.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Statement

#urls, #walk_statements

Constructor Details

#initialize(package_name, version_name) ⇒ Override

Returns a new instance of Override.



20
21
22
23
# File 'lib/fig/package/override.rb', line 20

def initialize(package_name, version_name)
  @package_name = package_name
  @version_name = version_name
end

Instance Attribute Details

#package_nameObject (readonly)

Returns the value of attribute package_name.



18
19
20
# File 'lib/fig/package/override.rb', line 18

def package_name
  @package_name
end

#version_nameObject (readonly)

Returns the value of attribute version_name.



18
19
20
# File 'lib/fig/package/override.rb', line 18

def version_name
  @version_name
end

Instance Method Details

#unparseObject



25
26
27
# File 'lib/fig/package/override.rb', line 25

def unparse()
  return ' override ' + @package_name + '/' + @version_name
end