Module: Befog::Commands::Mixins::Traceable
- Included in:
- Add
- Defined in:
- lib/befog/commands/mixins/traceable.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(target) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/befog/commands/mixins/traceable.rb', line 5 def self.included(target) target.module_eval do option :rehearse, :short => :u, :description => "Dry-run, verbose logging, but don't actually run anything" end end |
Instance Method Details
#rehearse? ⇒ Boolean
13 14 15 |
# File 'lib/befog/commands/mixins/traceable.rb', line 13 def rehearse? !![:rehearse] end |
#verbose(message) ⇒ Object
21 22 23 |
# File 'lib/befog/commands/mixins/traceable.rb', line 21 def verbose() log() if verbose? end |
#verbose? ⇒ Boolean
17 18 19 |
# File 'lib/befog/commands/mixins/traceable.rb', line 17 def verbose? !![:verbose] or rehearse? end |