class Composer::Package::CompletePackage

Package containing additional metadata that is not used by the solver

Attributes

authors[RW]
description[RW]
homepage[RW]
keywords[RW]
license[RW]
repositories[RW]
scripts[RW]
support[RW]

Public Class Methods

new(name, version, pretty_version) click to toggle source

Creates a new in memory package. Param: string name The package’s name Param: string version The package’s version Param: string prettyVersion The package’s non-normalized version

Calls superclass method Composer::Package::Package::new
# File lib/composer/package/complete_package.rb, line 25
def initialize(name, version, pretty_version)
  super(name, version, pretty_version)

  @license = []
  @scripts = []
  @support = []
  @abandoned = false
end

Public Instance Methods

abandoned=(abandoned) click to toggle source

Set abandoned Param boolean|string $abandoned

# File lib/composer/package/complete_package.rb, line 42
def abandoned=(abandoned)
  @abandoned = abandoned
end
is_abandoned?() click to toggle source

Determine if package is abandoned Return: true if package is abandoned; Otherwise false.

# File lib/composer/package/complete_package.rb, line 36
def is_abandoned?
  @abandoned
end
replacement_package() click to toggle source

If the package is abandoned and has a suggested replacement, this method returns it @return string|nil

# File lib/composer/package/complete_package.rb, line 49
def replacement_package
  return @abandoned.kind_of?(String) ? @abandoned : nil
end