Class: Composer::Package::CompletePackage
- Inherits:
-
Package
- Object
- BasePackage
- Package
- Composer::Package::CompletePackage
- Defined in:
- lib/composer/package/complete_package.rb
Overview
Package containing additional metadata that is not used by the solver
Direct Known Subclasses
Constant Summary
Constants inherited from BasePackage
BasePackage::STABILITY_ALPHA, BasePackage::STABILITY_BETA, BasePackage::STABILITY_DEV, BasePackage::STABILITY_RC, BasePackage::STABILITY_STABLE, BasePackage::SUPPORTED_LINK_TYPES
Instance Attribute Summary collapse
-
#authors ⇒ Object
Returns the value of attribute authors.
-
#description ⇒ Object
Returns the value of attribute description.
-
#homepage ⇒ Object
Returns the value of attribute homepage.
-
#keywords ⇒ Object
Returns the value of attribute keywords.
-
#license ⇒ Object
Returns the value of attribute license.
-
#repositories ⇒ Object
Returns the value of attribute repositories.
-
#scripts ⇒ Object
Returns the value of attribute scripts.
-
#support ⇒ Object
Returns the value of attribute support.
Attributes inherited from Package
#archive_excludes, #autoload, #binaries, #conflicts, #dev_autoload, #dev_requires, #dist_mirrors, #dist_reference, #dist_sha1_checksum, #dist_type, #dist_url, #extra, #include_paths, #installation_source, #notification_url, #provides, #release_date, #replaces, #requires, #source_mirrors, #source_reference, #source_type, #source_url, #stability, #suggests
Attributes inherited from BasePackage
#id, #name, #pretty_name, #pretty_version, #repository, #stability, #transport_options, #version
Instance Method Summary collapse
-
#abandoned=(abandoned) ⇒ Object
Set abandoned Param boolean|string $abandoned.
-
#initialize(name, version, pretty_version) ⇒ CompletePackage
constructor
Creates a new in memory package.
-
#is_abandoned? ⇒ Boolean
Determine if package is abandoned Return: true if package is abandoned; Otherwise false.
-
#replacement_package ⇒ Object
If the package is abandoned and has a suggested replacement, this method returns it.
Methods inherited from Package
#attributes, #is_dev, #pretty_string, #replace_version, #target_dir, #target_dir=, #type, #type=, #unique_name
Methods inherited from BasePackage
#attributes, #pretty_string, stabilities, #to_s, #type, #type=, #unique_name
Constructor Details
#initialize(name, version, pretty_version) ⇒ CompletePackage
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
25 26 27 28 29 30 31 32 |
# 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 |
Instance Attribute Details
#authors ⇒ Object
Returns the value of attribute authors.
18 19 20 |
# File 'lib/composer/package/complete_package.rb', line 18 def @authors end |
#description ⇒ Object
Returns the value of attribute description.
18 19 20 |
# File 'lib/composer/package/complete_package.rb', line 18 def description @description end |
#homepage ⇒ Object
Returns the value of attribute homepage.
18 19 20 |
# File 'lib/composer/package/complete_package.rb', line 18 def homepage @homepage end |
#keywords ⇒ Object
Returns the value of attribute keywords.
18 19 20 |
# File 'lib/composer/package/complete_package.rb', line 18 def keywords @keywords end |
#license ⇒ Object
Returns the value of attribute license.
18 19 20 |
# File 'lib/composer/package/complete_package.rb', line 18 def license @license end |
#repositories ⇒ Object
Returns the value of attribute repositories.
18 19 20 |
# File 'lib/composer/package/complete_package.rb', line 18 def repositories @repositories end |
#scripts ⇒ Object
Returns the value of attribute scripts.
18 19 20 |
# File 'lib/composer/package/complete_package.rb', line 18 def scripts @scripts end |
#support ⇒ Object
Returns the value of attribute support.
18 19 20 |
# File 'lib/composer/package/complete_package.rb', line 18 def support @support end |
Instance Method Details
#abandoned=(abandoned) ⇒ Object
Set abandoned Param boolean|string $abandoned
42 43 44 |
# File 'lib/composer/package/complete_package.rb', line 42 def abandoned=(abandoned) @abandoned = abandoned end |
#is_abandoned? ⇒ Boolean
Determine if package is abandoned Return: true if package is abandoned; Otherwise false.
36 37 38 |
# File 'lib/composer/package/complete_package.rb', line 36 def is_abandoned? @abandoned end |
#replacement_package ⇒ Object
If the package is abandoned and has a suggested replacement, this method returns it
49 50 51 |
# File 'lib/composer/package/complete_package.rb', line 49 def replacement_package return @abandoned.kind_of?(String) ? @abandoned : nil end |