disu.se

ExtensionClass

Namespace

Inventory

Ancestors
  1. Object

An extension represents a sub-directory under the “ext” directory in the project. Such a directory contains source files, usually written in C, that interface with the underlying Ruby implementation, and possibly other low-level systems, that aren’t otherwise available to Ruby code.

For an inventory, an extension is a set of files that should be included in the project and can contain multiple extensions. Inventory-Rake uses information found in these extensions to compile them for use from Ruby code.

Constructor

initialize(nameString){ … }?#

Creates an extension named name. A block may be given that’ll be #instance_exec’d in the extension being created so that various methods may be overridden to suit the extension being created.

Instance Methods

directoryString#

Returns the sub-directory into the project that contains the extension, the default being ext/{#name}.

extconfString#

Returns the path into the project that contains the “extconf.rb” file for the extension, the default being {#directory}/extconf.rb.

dependString#

Returns the path into the project that contains the “depend” file for the extension, the default being {#directory}/depend.

Note

This file is usually created by hand by invoking gcc -MM *.c > depend

sourcesArray<String>#

Returns the source files that make up the extension, the default being empty.

source_filesArray<String>#

Returns the complete paths of #sources inside the package.

additional_filesArray<String>#

Returns the complete paths to any additional files.

filesArray<String>#

Returns all files included in the package, that is [#extconf, #depend] + #source_files + #additional_files.

to_aArray<String>#

Returns whatever #files returns.

to_sString#

Returns the receiver’s #name.

nameString#

Returns the receiver’s #name.