Skip to content

Instantly share code, notes, and snippets.

@alexesDev
Last active December 14, 2015 00:09
Show Gist options
  • Select an option

  • Save alexesDev/4996689 to your computer and use it in GitHub Desktop.

Select an option

Save alexesDev/4996689 to your computer and use it in GitHub Desktop.
title: MyTitle
require 'sinatra/base'
require 'yaml'
require 'erb'
class MyApp < Sinatra::Base
get '/' do
@config = YAML.load_file('config.yaml');
render :home
end
def render(name)
erb name
end
end
<html>
<title><%= @config['title'] %></title>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment