Class: KeepYourHead::Compilation
- Inherits:
-
Object
- Object
- KeepYourHead::Compilation
- Defined in:
- lib/Keepyourhead/Compilation.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#directory ⇒ Object
Returns the value of attribute directory.
-
#filenames ⇒ Object
Returns the value of attribute filenames.
-
#output ⇒ Object
Returns the value of attribute output.
-
#success ⇒ Object
Returns the value of attribute success.
Instance Method Summary collapse
-
#initialize(content, success, output, directory, filenames) ⇒ Compilation
constructor
A new instance of Compilation.
- #remove ⇒ Object
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
#content ⇒ Object
Returns the value of attribute content.
21 22 23 |
# File 'lib/Keepyourhead/Compilation.rb', line 21 def content @content end |
#directory ⇒ Object
Returns the value of attribute directory.
21 22 23 |
# File 'lib/Keepyourhead/Compilation.rb', line 21 def directory @directory end |
#filenames ⇒ Object
Returns the value of attribute filenames.
21 22 23 |
# File 'lib/Keepyourhead/Compilation.rb', line 21 def filenames @filenames end |
#output ⇒ Object
Returns the value of attribute output.
21 22 23 |
# File 'lib/Keepyourhead/Compilation.rb', line 21 def output @output end |
#success ⇒ Object
Returns the value of attribute success.
21 22 23 |
# File 'lib/Keepyourhead/Compilation.rb', line 21 def success @success end |
Instance Method Details
#remove ⇒ Object
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 |