disu.se

DependenciesClass

Namespace

Inventory

Ancestors
  1. Enumerable

  2. Object

Contains zero or more dependencies of the project. Dependencies can be added, #required, enumerated, and added to Gem specifications. Dependencies are set up by passing a block to #initialize and calling #development, #runtime, and #optional inside it.

Example: Creating a List of Dependencies
Dependencies.new{
  development 'inventory-rake', 1, 3, 0
  runtime 'bar', 1, 6, 0
}

Children

Development

A development dependency is one that’s needed during development of a project.

Optional

An optional dependency is one that may or may not be needed during runtime.

Runtime

A runtime dependency is one that’s needed during runtime.

Constructor

initialize(*dependenciesDependency*){ … }?#

Creates a new list of dependencies and allows more to be added in the optionally #instance_exec’d block by calling #development, #runtime, and #optional inside it.

Instance Methods

development(nameString, majorInteger, minorInteger, patchInteger, optionsHash = {})selfprivate#

Add a Development dependency on project name, version major, minor, patch, along with any options.

Options
:featureString = '%s-%s.0' % [name.gsub('-', '/'), major]

The name of the feature to load

runtime(nameString, majorInteger, minorInteger, patchInteger, optionsHash = {})selfprivate#

Add a Runtime dependency on project name, version major, minor, patch, along with any options.

Options
:featureString = '%s-%s.0' % [name.gsub('-', '/'), major]

The name of the feature to load

optional(nameString, majorInteger, minorInteger, patchInteger, optionsHash = {})selfprivate#

Add an Optional dependency on project name, version major, minor, patch, along with any options.

Options
:featureString = '%s-%s.0' % [name.gsub('-', '/'), major]

The name of the feature to load

+(otherDependencies)Dependencies#

Returns the dependencies of the receiver and those of other.

each{ |dependencyDependency| … }self#

Enumerates the dependencies.

eachEnumerator<Dependency>#

Returns an Enumerator over the dependencies.

requireself#

Require each dependency in turn.

add_to_gem_specification(specificationGem::Specification)self#

Add each dependency to a Gem specification.