Class: TraceTree::TmpFile

Inherits:
Object
  • Object
show all
Defined in:
lib/trace_tree/tmp_file.rb

Constant Summary collapse

DefaultName =
'trace_tree.html'

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ TmpFile

Returns a new instance of TmpFile.



9
10
11
12
# File 'lib/trace_tree/tmp_file.rb', line 9

def initialize path
  path = recognize_dir path
  @tmp = custom path
end

Instance Method Details

#pathObject



20
21
22
# File 'lib/trace_tree/tmp_file.rb', line 20

def path
  @tmp
end

#puts(*content) ⇒ Object



14
15
16
17
18
# File 'lib/trace_tree/tmp_file.rb', line 14

def puts *content
  File.open @tmp, 'a' do |f|
    f.puts *content
  end
end