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.



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

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

Instance Method Details

#pathObject



26
27
28
# File 'lib/trace_tree/tmp_file.rb', line 26

def path
  @tmp
end

#puts(*content) ⇒ Object



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

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