Class: KeepYourHead::Compilation

Inherits:
Object
  • Object
show all
Defined in:
lib/Keepyourhead/Compilation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content, success, output, directory, filenames) ⇒ Compilation

Returns a new instance of Compilation.



23
24
25
26
# File 'lib/Keepyourhead/Compilation.rb', line 23

def initialize( content, success, output, directory, filenames )
	self.content, self.success, self.output, self.directory, self.filenames =
		content, success, output, directory, filenames
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



21
22
23
# File 'lib/Keepyourhead/Compilation.rb', line 21

def content
  @content
end

#directoryObject

Returns the value of attribute directory.



21
22
23
# File 'lib/Keepyourhead/Compilation.rb', line 21

def directory
  @directory
end

#filenamesObject

Returns the value of attribute filenames.



21
22
23
# File 'lib/Keepyourhead/Compilation.rb', line 21

def filenames
  @filenames
end

#outputObject

Returns the value of attribute output.



21
22
23
# File 'lib/Keepyourhead/Compilation.rb', line 21

def output
  @output
end

#successObject

Returns the value of attribute success.



21
22
23
# File 'lib/Keepyourhead/Compilation.rb', line 21

def success
  @success
end

Instance Method Details

#removeObject



28
29
30
31
32
33
34
# File 'lib/Keepyourhead/Compilation.rb', line 28

def remove
	self.filenames.each{ |filename| 
		FileUtils.rm filename if ::File.exist? filename
	}

	FileUtils.rm_r self.directory if ::File.exist? self.directory
end