Module: ShellOpts::Messages
- Defined in:
- lib/shellopts.rb
Overview
The Include module brings the reporting methods into the namespace when included
Class Method Summary collapse
Instance Method Summary collapse
- #debug(message) ⇒ Object
- #mesg(message) ⇒ Object
- #notice(message) ⇒ Object
- #verb(level = 1, message) ⇒ Object
Class Method Details
.include ⇒ Object
353 354 355 356 |
# File 'lib/shellopts.rb', line 353 def self.include(...) @is_included = true super end |
.is_included? ⇒ Boolean
352 |
# File 'lib/shellopts.rb', line 352 def self.is_included?() @is_included end |
Instance Method Details
#debug(message) ⇒ Object
370 371 372 |
# File 'lib/shellopts.rb', line 370 def debug() $stdout.puts if debug? end |
#mesg(message) ⇒ Object
362 363 364 |
# File 'lib/shellopts.rb', line 362 def mesg() $stdout.puts if !quiet? end |
#notice(message) ⇒ Object
358 359 360 |
# File 'lib/shellopts.rb', line 358 def notice() $stderr.puts "#{name}: #{}" if !quiet? end |
#verb(level = 1, message) ⇒ Object
366 367 368 |
# File 'lib/shellopts.rb', line 366 def verb(level = 1, ) $stdout.puts if level <= @verbose end |