Class: Codelog::Output::ReleaseFile
- Inherits:
-
Object
- Object
- Codelog::Output::ReleaseFile
- Defined in:
- lib/codelog/output/release_file.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file_path) ⇒ ReleaseFile
constructor
A new instance of ReleaseFile.
- #print(content) ⇒ Object
Constructor Details
#initialize(file_path) ⇒ ReleaseFile
4 5 6 |
# File 'lib/codelog/output/release_file.rb', line 4 def initialize(file_path) @file_path = file_path end |
Class Method Details
.print(content, file_path) ⇒ Object
8 9 10 |
# File 'lib/codelog/output/release_file.rb', line 8 def self.print(content, file_path) new(file_path).print(content) end |
Instance Method Details
#print(content) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/codelog/output/release_file.rb', line 12 def print(content) Dir.chdir Dir.pwd do File.open(@file_path, 'a') do |line| line.puts content end end end |