class Raykit::SourceImports
Public Class Methods
load(filename)
click to toggle source
# File lib/raykit/sourceImports.rb, line 36 def self.load(filename) sourceImports = SourceImports.new([]) array=JSON.parse(IO.read(filename)) array.each{|hash| sourceImport = SourceImport.new(hash['remote'],hash['source'],hash['glob'],hash['target'],hash['commit']) sourceImports << sourceImport } sourceImports end
new(urls)
click to toggle source
# File lib/raykit/sourceImports.rb, line 5 def initialize(urls) urls.each{|url| self << SourceImport.new(url,'src','**/*.cs','dep','') } end
Public Instance Methods
copy()
click to toggle source
# File lib/raykit/sourceImports.rb, line 17 def copy self.each{|si| si.copy } end
save(filename)
click to toggle source
# File lib/raykit/sourceImports.rb, line 30 def save(filename) File.open(filename,'w'){|f| f.write(JSON.pretty_generate(self)) } end
targets_exist?()
click to toggle source
# File lib/raykit/sourceImports.rb, line 23 def targets_exist? self.each{|si| return false if(!Dir.exist?(si.target)) } true end
update()
click to toggle source
# File lib/raykit/sourceImports.rb, line 11 def update self.each{|si| si.update } end