Skip to content

Instantly share code, notes, and snippets.

@kballenegger
Created August 22, 2013 22:29
Show Gist options
  • Select an option

  • Save kballenegger/6313600 to your computer and use it in GitHub Desktop.

Select an option

Save kballenegger/6313600 to your computer and use it in GitHub Desktop.
This is what the DSL might look like.
Modernizer.new do
request_version { @env[...] }
first do
add 'hello' { 'hardcoded' }
end
modernize '1.2.1' do
add 'foo' { "#{@body['hello']}-bar" }
end
modernize '1.2.3' do
delete 'hello'
map 'foo' {|x| "baz-#{x}" }
end
last do
delete 'foo'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment