Class: SecurityGuard::Utils::Files

Inherits:
Object
  • Object
show all
Defined in:
lib/security_guard/utils/files.rb

Class Method Summary collapse

Class Method Details

.load(filename) ⇒ Object



4
5
6
# File 'lib/security_guard/utils/files.rb', line 4

def self.load(filename)
  File.expand_path("../../../../data/#{filename}", __FILE__)
end

.to_array(line_delimited_file) ⇒ Object



8
9
10
# File 'lib/security_guard/utils/files.rb', line 8

def self.to_array(line_delimited_file)
  File.readlines(line_delimited_file).map{ |line| line.chomp }
end