Class: Zipper::FileEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/zipper/fileEntry.rb

Instance Method Summary collapse

Constructor Details

#initialize(file_name, flatten_structure = false, file_path = nil) ⇒ FileEntry

Returns a new instance of FileEntry.



3
4
5
6
7
# File 'lib/zipper/fileEntry.rb', line 3

def initialize(file_name, flatten_structure = false, file_path = nil)
    @name = file_name
    @path = file_path
    @flatten = flatten_structure
end

Instance Method Details

#flattenObject

True if existing directory structure shouldn’t be preserved’



15
16
17
# File 'lib/zipper/fileEntry.rb', line 15

def flatten
    @flatten
end

#nameObject

Entry name, used as a real path in file system



10
11
12
# File 'lib/zipper/fileEntry.rb', line 10

def name
    @name
end

#pathObject

Path of entry in a zip archive



20
21
22
# File 'lib/zipper/fileEntry.rb', line 20

def path
    @path
end