Class: EM::FTPD::FSD::DirectoryItem

Inherits:
Object
  • Object
show all
Defined in:
lib/em-ftpd-fsd/directory_item.rb

Overview

This is a copy of original DirectoryItem class found in yob’s repository. The goal of duplication is not to required em-ftpd.

Given gem official repository is not active and there are a lot of forks it is better to redefine this class here and be able to use em-ftpd from any source that tie the entire driver to a one repository.

Constant Summary collapse

ATTRS =

Fields for DirectoryItem

[:name, :owner, :group, :size, :time, :permissions, :directory]

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ DirectoryItem

Initializer method

Parameters:

  • options (Hash)

Options Hash (options):

  • name (Object)
  • name (Object)
  • owner (Object)
  • group (Object)
  • size (Object)
  • time (Object)
  • permissions (Object)
  • directory (Object)


43
44
45
46
47
# File 'lib/em-ftpd-fsd/directory_item.rb', line 43

def initialize(options)
  options.each do |attr, value|
    self.send("#{attr}=", value)
  end
end