Sha256: ef7f4188874ee61b1cd5a6af579d7a8f056e49dfc1b9aaba8071d9674622c3a2

Contents?: true

Size: 695 Bytes

Versions: 3

Compression:

Stored size: 695 Bytes

Contents

require 'fig/packagedescriptor'
require 'fig/statement'

module Fig; end

# 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.
class Fig::Statement::Override < Fig::Statement
  attr_reader :package_name, :version

  def initialize(line_column, package_name, version)
    super(line_column)

    @package_name = package_name
    @version = version
  end

  def unparse()
    return ' override ' + Fig::PackageDescriptor.format(@package_name, @version, nil)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fig-0.1.62 lib/fig/statement/override.rb
fig-0.1.61 lib/fig/statement/override.rb
fig-0.1.59 lib/fig/statement/override.rb