Class: BackItUp::FileList

Inherits:
Object
  • Object
show all
Defined in:
lib/back_it_up/file_list.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(files, dirs) ⇒ FileList

Returns a new instance of FileList.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/back_it_up/file_list.rb', line 7

def initialize(files, dirs)
  @files = []
  files.each {|f| @files << f }
  
  dirs.each do |d| 
    Find.find(d) do |f|
      next if File.directory?(f)
      @files << f
    end
  end
end

Instance Attribute Details

#filesObject (readonly)

Returns the value of attribute files.



5
6
7
# File 'lib/back_it_up/file_list.rb', line 5

def files
  @files
end