Skip to content

Instantly share code, notes, and snippets.

@miaout17
Created August 22, 2011 11:09
Show Gist options
  • Save miaout17/1162151 to your computer and use it in GitHub Desktop.
Save miaout17/1162151 to your computer and use it in GitHub Desktop.
simple yaml+erb
production:
name: <%= name %>
password: <%= password %>
require 'yaml'
require 'erb'
def go
name = 'hihihi'
password = 'mypassword'
yml = ERB.new(File.read('config.yaml.erb')).result(binding)
puts YAML.load(yml).inspect
end
go()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment