Module: Kubes::Compiler::Util::SaveFile

Included in:
Strategy::Base, Strategy::Erb::YamlError
Defined in:
lib/kubes/compiler/util/save_file.rb

Instance Method Summary collapse

Instance Method Details

#save_file(path) ⇒ Object



3
4
5
6
# File 'lib/kubes/compiler/util/save_file.rb', line 3

def save_file(path)
  filename = path.sub(%r{.*\.kubes/resources/},'') # IE: web/deployment.rb or web/deployment.yaml
  filename.sub('.yml','.yaml').sub('.rb','.yaml')
end