Sha256: b69ea85da509f61c06b5b545b4d55058cee91a24f429d1d107403b13933a858c

Contents?: true

Size: 369 Bytes

Versions: 13

Compression:

Stored size: 369 Bytes

Contents

require 'rubygems'
require 'ramaze'

class MainController < Ramaze::Controller
  layout :page
  provide :html, :engine => :Nagoro

  def index
    @title = "Test"
    "<p>Hello, World!</p>"
  end

  def page
    %q{
<html>
  <head>
    <title>examples/layout</title>
  </head>
  <body>
    <h1>#@title</h1>
    #@content
  </body>
</html>
    }
  end
end

Ramaze.start

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ramaze-2023.01.06 examples/basic/layout.rb
ramaze-2012.12.08 examples/basic/layout.rb
ramaze-2012.12.08b examples/basic/layout.rb
ramaze-2012.04.14 examples/basic/layout.rb
ramaze-2012.03.07 examples/basic/layout.rb
ramaze-2011.12.28 examples/basic/layout.rb
ramaze-2011.10.23 examples/basic/layout.rb
ramaze-2011.07.25 examples/basic/layout.rb
ramaze-2011.01.30 examples/basic/layout.rb
ramaze-2011.01 examples/basic/layout.rb
ramaze-2010.06.18 examples/basic/layout.rb
ramaze-2010.04.04 examples/basic/layout.rb
ramaze-2010.04 examples/basic/layout.rb