Module: Matt::Support::Puts
- Included in:
- Command, Participant
- Defined in:
- lib/matt/support/puts.rb
Instance Method Summary collapse
- #debug(message) ⇒ Object
- #info(message) ⇒ Object
- #puts_err(*args, &bl) ⇒ Object
- #puts_out(*args, &bl) ⇒ Object (also: #puts)
- #stderr ⇒ Object
- #stdout ⇒ Object
Instance Method Details
#debug(message) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/matt/support/puts.rb', line 31 def debug() = "#{self.to_s.ljust(30)} -- #{message}" return $stderr.puts() unless configuration return unless configuration.debug_level >= Configuration::DEBUG_VERBOSE puts_err() end |
#info(message) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/matt/support/puts.rb', line 24 def info() = "#{self.to_s.ljust(30)} -- #{message}" return $stderr.puts() unless configuration return unless configuration.debug_level >= Configuration::DEBUG_INFO puts_err() end |
#puts_err(*args, &bl) ⇒ Object
19 20 21 22 |
# File 'lib/matt/support/puts.rb', line 19 def puts_err(*args, &bl) return $stderr.puts(*args, &bl) unless configuration configuration.stderr.puts(*args, &bl) end |
#puts_out(*args, &bl) ⇒ Object Also known as: puts
13 14 15 16 |
# File 'lib/matt/support/puts.rb', line 13 def puts_out(*args, &bl) return $stdout.puts(*args, &bl) unless configuration configuration.stdout.puts(*args, &bl) end |
#stderr ⇒ Object
9 10 11 |
# File 'lib/matt/support/puts.rb', line 9 def stderr configuration.stderr end |
#stdout ⇒ Object
5 6 7 |
# File 'lib/matt/support/puts.rb', line 5 def stdout configuration.stdout end |