Sha256: c8532a14708c4252da8b5b030206fcfd4eda4c165af7c694bb1484900ea50a0c

Contents?: true

Size: 605 Bytes

Versions: 2

Compression:

Stored size: 605 Bytes

Contents

require 'ramaze'
include Ramaze

class Page < Ezamar::Element
  def render
    %{
     <html>
      <head>
        <title>examples/element</title>
      </head>
      <body>
        <h1>#{@hash['title']}</h1>
        #{content}
      </body>
    </html>
    }
  end
end

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

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

start

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ramaze-0.0.8 examples/element.rb
ramaze-0.0.9 examples/element.rb