Class: YamlLog

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

Instance Method Summary collapse

Constructor Details

#initializeYamlLog

Returns a new instance of YamlLog.



4
5
# File 'lib/yamllog.rb', line 4

def initialize
end

Instance Method Details

#finalizeObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/yamllog.rb', line 7

def finalize
  name='DEV'
  ARGV.each do|a|
    name="#{name}.#{a}"
  end
  name="#{name}.yml"
  FileUtils.mkdir("#{Environment.dev_root}/log") if !File.exists?("#{Environment.dev_root}/log")
  File.open("#{Environment.dev_root}/log/#{name}","w") do |f|
      f.write(DEV.to_yaml)
  end
end