Class: Reap::Hosts::Host
Overview
Host
Base class for Hosts.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Tool
Class Method Summary collapse
Instance Method Summary collapse
-
#announce_confirm?(options = {}) ⇒ Boolean
Generic announce confirmation.
- #inspect ⇒ Object
-
#release_confirm?(options = {}) ⇒ Boolean
Generic announce confirmation.
Methods inherited from Tool
#debug?, #dryrun?, #force?, from_project, #initialize, #metadata, #trace?, #verbose?
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
This class inherits a constructor from Reap::Tool
Class Method Details
.factory(name) ⇒ Object
31 32 33 |
# File 'lib/reap/hosts/host.rb', line 31 def self.factory(name) registry[name] end |
.inherited(base) ⇒ Object
26 27 28 29 |
# File 'lib/reap/hosts/host.rb', line 26 def self.inherited(base) scm = base.basename.downcase registry[scm] = base end |
.register(*uris) ⇒ Object
20 21 22 23 24 |
# File 'lib/reap/hosts/host.rb', line 20 def self.register(*uris) uris.each do |uri| registry[uri] = self end end |
Instance Method Details
#announce_confirm?(options = {}) ⇒ Boolean
Generic announce confirmation.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/reap/hosts/host.rb', line 37 def announce_confirm?(={}) return true if force? ans = ask("Announce to #{self.class.basename.downcase}?", "yN") case ans.downcase when 'y', 'yes' true else false end end |
#inspect ⇒ Object
61 62 63 |
# File 'lib/reap/hosts/host.rb', line 61 def inspect "<#{self.class}>" end |
#release_confirm?(options = {}) ⇒ Boolean
Generic announce confirmation.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/reap/hosts/host.rb', line 50 def release_confirm?(={}) return true if force? ans = ask("Release to #{self.class.basename.downcase}?", "yN") case ans.downcase when 'y', 'yes' true else false end end |