Module: GreenHat::ShellHelper::Log

Defined in:
lib/greenhat/shell/log.rb

Overview

Log Helpers

Class Method Summary collapse

Class Method Details

.lastObject



387
388
389
# File 'lib/greenhat/shell/log.rb', line 387

def self.last
  @last
end

.last=(value) ⇒ Object



383
384
385
# File 'lib/greenhat/shell/log.rb', line 383

def self.last=(value)
  @last = value.join(' ')
end

.listObject

Limit to Log Files



397
398
399
# File 'lib/greenhat/shell/log.rb', line 397

def self.list
  Thing.all.select(&:log)
end

.no_files_warning(files) ⇒ Object



391
392
393
394
# File 'lib/greenhat/shell/log.rb', line 391

def self.no_files_warning(files)
  puts "No matching files found for pattern #{files.to_s.pastel(:yellow)}"
  puts "See #{'ls'.pastel(:blue)} for available files"
end