Sha256: dae0b417fc875aa2a3039ad3ac4cf9f79013fe161c1f174a73f4d1eca1cbef73

Contents?: true

Size: 661 Bytes

Versions: 37

Compression:

Stored size: 661 Bytes

Contents

require 'rubygems'
require 'ramaze'
require 'nagoro'

class Page < Nagoro::Element
  def render
    %{
     <html>
      <head>
        <title>examples/element</title>
      </head>
      <body>
        <h1>#{@title}</h1>
        #{content}
      </body>
    </html>
    }
  end
end

class SideBar < Nagoro::Element
  def render
    %{
     <div class="sidebar">
       <a href="http://something.com">something</a>
     </div>
     }
  end
end

class MainController < Ramaze::Controller
  map '/'
  engine :Nagoro

  def index
    %{
    <Page title="Test">
      <SideBar />
      <p>
        Hello, World!
      </p>
    </Page>
    }
  end
end

Ramaze.start

Version data entries

37 entries across 37 versions & 4 rubygems

Version Path
ramaze-2023.01.06 examples/basic/element.rb
Pistos-ramaze-2009.04.08 examples/basic/element.rb
Pistos-ramaze-2009.06.12 examples/basic/element.rb
manveru-ramaze-2009.04.01 examples/basic/element.rb
manveru-ramaze-2009.04.08 examples/basic/element.rb
manveru-ramaze-2009.04.18 examples/basic/element.rb
manveru-ramaze-2009.04.22 examples/basic/element.rb
manveru-ramaze-2009.04 examples/basic/element.rb
manveru-ramaze-2009.05.08 examples/basic/element.rb
manveru-ramaze-2009.05 examples/basic/element.rb
manveru-ramaze-2009.06.04 examples/basic/element.rb
manveru-ramaze-2009.06.12 examples/basic/element.rb
manveru-ramaze-2009.06 examples/basic/element.rb
manveru-ramaze-2009.07 examples/basic/element.rb
rjspotter-ramaze-2009.06.29 examples/basic/element.rb
rjspotter-ramaze-2009.06.31 examples/basic/element.rb
ramaze-2012.12.08 examples/basic/element.rb
ramaze-2012.12.08b examples/basic/element.rb
ramaze-2012.04.14 examples/basic/element.rb
ramaze-2012.03.07 examples/basic/element.rb