Class: Jeka::Analysis::SourceFile

Inherits:
Object
  • Object
show all
Includes:
DataMapper::Resource
Defined in:
lib/jeka/analysis/source_file.rb

Class Method Summary collapse

Class Method Details

.convert(array) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/jeka/analysis/source_file.rb', line 12

def self.convert(array)
  files = []
  array.each do |file|
    files << SourceFile.new(
      name: File.basename(file),
      source: File.open(file).readlines.join
    )
  end
  files
end