Module: Unity::Modules::Logable
- Defined in:
- lib/unity/modules/logable.rb
Instance Attribute Summary collapse
-
#log_file ⇒ Object
readonly
Returns the value of attribute log_file.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
Instance Attribute Details
#log_file ⇒ Object (readonly)
Returns the value of attribute log_file.
8 9 10 |
# File 'lib/unity/modules/logable.rb', line 8 def log_file @log_file end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
8 9 10 |
# File 'lib/unity/modules/logable.rb', line 8 def logger @logger end |
Instance Method Details
#clean_logfile ⇒ Object
10 11 12 13 14 |
# File 'lib/unity/modules/logable.rb', line 10 def clean_logfile return if log_file.kind_of?(IO) File.open(log_file, 'w') {} end |
#puts_log_path ⇒ Object
16 17 18 |
# File 'lib/unity/modules/logable.rb', line 16 def puts_log_path $stdout.puts("All logs in #{log_file}") end |