Class: Ftpeter::Changes

Inherits:
Struct
  • Object
show all
Defined in:
lib/ftpeter/changes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addedObject

Returns the value of attribute added



3
4
5
# File 'lib/ftpeter/changes.rb', line 3

def added
  @added
end

#changedObject

Returns the value of attribute changed



3
4
5
# File 'lib/ftpeter/changes.rb', line 3

def changed
  @changed
end

#deletedObject

Returns the value of attribute deleted



3
4
5
# File 'lib/ftpeter/changes.rb', line 3

def deleted
  @deleted
end

Instance Method Details

#newdirsObject



4
5
6
7
8
9
# File 'lib/ftpeter/changes.rb', line 4

def newdirs
  @newdirs ||= added
                 .map { |fn| Pathname.new(fn).dirname.to_s }
                 .uniq
                 .reject { |fn| fn == '.' }
end