Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 bench.rb
README.md

Rumble

HTML markup in Ruby. Fast. 130 LoC. Supports CSS-proxies (see below).

Example using Draper:

class ArticleDecorator < Draper::Base
  decorates :article
  include Rumble

  def published_at
    span.published_at do
      span model.published_at.strftime("%A, %B %e").squeeze(" "), :class => 'date'
      span model.published_at.strftime("%l:%M%p").delete(" "), :class => 'time'
    end
  end
end

CSS-proxy syntax

Thanks to CSS-proxies, you can more easily define classes and ids on elements:

div.wrapper! do
  input.text.example(:name => 'username')
end

Renders as:

<div id="wrapper">
  <input class="text example" name="username">
</div>

You are of course free to use the simple syntax too:

div :id => "wrapper" do
  input :class => "text example", :name => "username"
end
Something went wrong with that request. Please try again.