Class: Prick::DumpFile

Inherits:
Object
  • Object
show all
Defined in:
lib/prick/archive.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project, name) ⇒ DumpFile

Returns a new instance of DumpFile.



9
10
11
12
13
14
# File 'lib/prick/archive.rb', line 9

def initialize(project, name)
  @project = project
  @name = name
  @file = "#{project.name}-#{name}.#{DUMP_EXT}"
  @path = File.join(CACHE_DIR, @file)
end

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



6
7
8
# File 'lib/prick/archive.rb', line 6

def file
  @file
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/prick/archive.rb', line 5

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



7
8
9
# File 'lib/prick/archive.rb', line 7

def path
  @path
end

#projectObject (readonly)

Returns the value of attribute project.



4
5
6
# File 'lib/prick/archive.rb', line 4

def project
  @project
end

Instance Method Details

#deleteObject



18
# File 'lib/prick/archive.rb', line 18

def delete() FileUtils.rm_f(path) end

#exist?Boolean

Returns:

  • (Boolean)


16
# File 'lib/prick/archive.rb', line 16

def exist?() File.exist?(path) end