Sha256: a5491d107d7afa2b619b8a4e789798ecefaa197bf2a24fddbea73990f4fbb18f

Contents?: true

Size: 717 Bytes

Versions: 4

Compression:

Stored size: 717 Bytes

Contents

set :views, lambda { File.join(File.dirname(__FILE__), "views") }

get '/empty_action' do
  "hi there"
end

get '/markaby_template' do
  mab :markaby_template
end

get '/simple_html' do
  mab :simple_html
end

get '/variables' do
  mab :variables, {}, :name => "Scott Taylor"
end

get '/variables_with_locals' do
  mab :variables, :locals => { :name => "Scott Taylor" }
end

get '/scope_instance_variables' do
  @name = "Scott Taylor"
  mab :variables
end

template :layout_index do
  'div.title "Hello World!"'
end

get "/named_template" do
  mab :layout_index
end

get "/layout" do
  @display_layout = true
  mab :layout_index
end

helpers do
  def chunky
    "bacon"
  end
end

get "/helpers" do
  mab :helpers
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
mab-0.0.2 markaby/spec/markaby/sinatra/app.rb
markaby-0.7.2 spec/markaby/sinatra/app.rb
markaby-0.7.1 spec/markaby/sinatra/app.rb
markaby-0.7.0 spec/markaby/sinatra/app.rb