Class: YamlLog
- Inherits:
-
Object
- Object
- YamlLog
- Defined in:
- lib/yamllog.rb
Instance Method Summary collapse
- #finalize ⇒ Object
-
#initialize ⇒ YamlLog
constructor
A new instance of YamlLog.
Constructor Details
#initialize ⇒ YamlLog
Returns a new instance of YamlLog.
4 5 |
# File 'lib/yamllog.rb', line 4 def initialize end |
Instance Method Details
#finalize ⇒ Object
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 |