Class: Texrack::OutputFile
- Inherits:
-
Object
- Object
- Texrack::OutputFile
- Defined in:
- lib/texrack/output_file.rb
Instance Method Summary collapse
- #exists? ⇒ Boolean
- #finish ⇒ Object
-
#initialize(digest) ⇒ OutputFile
constructor
A new instance of OutputFile.
- #path ⇒ Object (also: #to_path)
Constructor Details
#initialize(digest) ⇒ OutputFile
Returns a new instance of OutputFile.
4 5 6 7 |
# File 'lib/texrack/output_file.rb', line 4 def initialize(digest) @digest = digest FileUtils.mkdir_p file_path end |
Instance Method Details
#exists? ⇒ Boolean
14 15 16 |
# File 'lib/texrack/output_file.rb', line 14 def exists? File.readable?(file) && File.size?(file) end |
#finish ⇒ Object
18 19 20 |
# File 'lib/texrack/output_file.rb', line 18 def finish FileUtils.chmod(0644, file) end |
#path ⇒ Object Also known as: to_path
9 10 11 |
# File 'lib/texrack/output_file.rb', line 9 def path file end |