Class: Composer::Package::RootAliasPackage

Inherits:
CompletePackage show all
Defined in:
lib/composer/package/root_alias_package.rb

Overview

The root package represents the project’s composer.json and contains additional metadata

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

Attributes inherited from CompletePackage

#authors, #description, #homepage, #keywords, #license, #repositories, #scripts, #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

Methods inherited from CompletePackage

#abandoned=, #is_abandoned?, #replacement_package

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) ⇒ RootAliasPackage

Creates a new root package 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



26
27
28
29
30
31
32
33
# File 'lib/composer/package/root_alias_package.rb', line 26

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

  @minimum_stability = 'stable'
  @stability_flags = []
  @references = []
  @aliases = []
end

Instance Attribute Details

#aliasesObject

Returns the value of attribute aliases.



19
20
21
# File 'lib/composer/package/root_alias_package.rb', line 19

def aliases
  @aliases
end

#minimum_stabilityObject

Returns the value of attribute minimum_stability.



19
20
21
# File 'lib/composer/package/root_alias_package.rb', line 19

def minimum_stability
  @minimum_stability
end

#prefer_stableObject

Returns the value of attribute prefer_stable.



19
20
21
# File 'lib/composer/package/root_alias_package.rb', line 19

def prefer_stable
  @prefer_stable
end

#referencesObject

Returns the value of attribute references.



19
20
21
# File 'lib/composer/package/root_alias_package.rb', line 19

def references
  @references
end

#stability_flagsObject

Returns the value of attribute stability_flags.



19
20
21
# File 'lib/composer/package/root_alias_package.rb', line 19

def stability_flags
  @stability_flags
end