Class: Detroit::Tool

Inherits:
BasicTool show all
Includes:
ShellUtils
Defined in:
lib/detroit.rb

Overview

The common base class for tools. Tool is a subclass of BasicTool that adds additional utility methods, in particular it adds ShellUtils. Unless there is a specific reason not to do so, this is the class that specific tool classes should subclass.

A good tool will check to see if the state of the project is current or not to know if some stage of the tool needs to be used or not. For example a documentation# tool can look to see if any the files it would document are newer that the previous generated set of document file. In this case it can output a message explaining that the action was not needed. For example, the RDoc tool outputs the message: “RDocs are current (path/to/rdocs)”. The tool can also support the ‘$FORCE` global to force the procedure regardless.

Constant Summary

Constants included from ShellUtils

ShellUtils::RUBY

Instance Attribute Summary

Attributes included from ShellUtils

#debug, #force, #quiet, #stderr, #stdin, #stdout, #trace, #trial, #verbose

Attributes inherited from BasicTool

#options

Method Summary

Methods included from ShellUtils

#absolute?, #append, #ask, #atime, #blockdev?, #chardev?, #ctime, #debug?, #directory?, #dryrun?, #executable?, #executable_real?, #exist?, #exists?, #file?, #force?, #grpowned?, #identical?, #initialize_extension_defaults, #initialize_extensions, #method_missing, #mtime, #multiglob, #multiglob_r, #noop?, #owned?, #password, #path, #path=, #pipe?, #prerequisite, #print, #puts, #quiet?, #read, #readable?, #readable_real?, #relative?, #ruby, #safe?, #setgid?, #setuid?, #sh, #silent?, #size, #size?, #socket?, #status, #sticky?, #symlink?, #trace?, #trial?, #utime, #verbose?, #warn, #writable?, #writable_real?, #write, #zero?

Methods inherited from BasicTool

#assemble, #assemble?, assembly, assembly=, available?, #initialize, #initialize_options, #metadata, new, options, #prerequisite, #project, #project=, #root, #title

Methods included from BasicUtils

#apply_naming_policy, #config, #naming_policy, #root, #root_pattern

Constructor Details

This class inherits a constructor from Detroit::BasicTool

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Detroit::ShellUtils