Class: Reap::Tool

Inherits:
Object
  • Object
show all
Includes:
Utilities
Defined in:
lib/reap/tool.rb

Overview

Tool

The Tool class provides a common base classs for project tools.

Direct Known Subclasses

Hosts::Host, Systems::System

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utilities

#ask, #bin?, #cd, #command_paths, #compress, #dir!, #dir?, directory!, directory?, #email, exist!, exist?, #exists!, #exists?, #file!, #file?, #fileutils, #glob, #list_option, #multiglob, #multiglob_r, #out_of_date?, #password, path!, path?, #read, #rm_r, #safe?, #sh, #stage, #stage_manifest, #status, #write, #ziputils

Constructor Details

#initialize(project, options = nil) ⇒ Tool

Returns a new instance of Tool.



20
21
22
23
# File 'lib/reap/tool.rb', line 20

def initialize(project, options=nil)
  @project = project
  @options = (options || {}).rekey
end

Instance Attribute Details

#projectObject (readonly)

Returns the value of attribute project.



14
15
16
# File 'lib/reap/tool.rb', line 14

def project
  @project
end

Class Method Details

.from_project(project, options = nil) ⇒ Object



16
17
18
# File 'lib/reap/tool.rb', line 16

def self.from_project(project, options=nil)
  new(project, options)
end

Instance Method Details

#debug?Boolean

Returns:

  • (Boolean)


31
# File 'lib/reap/tool.rb', line 31

def debug?   ; project.debug?   ; end

#dryrun?Boolean

Returns:

  • (Boolean)


32
# File 'lib/reap/tool.rb', line 32

def dryrun?  ; project.dryrun?  ; end

#force?Boolean

Returns:

  • (Boolean)


29
# File 'lib/reap/tool.rb', line 29

def force?   ; project.force?   ; end

#metadataObject



25
26
27
# File 'lib/reap/tool.rb', line 25

def 
  project.
end

#trace?Boolean

Returns:

  • (Boolean)


30
# File 'lib/reap/tool.rb', line 30

def trace?   ; project.trace?   ; end

#verbose?Boolean

Returns:

  • (Boolean)


33
# File 'lib/reap/tool.rb', line 33

def verbose? ; project.verbose? ; end