Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Rails helpers defined with haml.
branch: master

This branch is even with cohitre:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
Gemfile.lock
Rakefile
hanlon.gemspec
readme.md

readme.md

hanlon: Rails helpers defined in haml

Example

class RobGreeter
  include Hanlon
  load_template %q<

- hanlon :yell do |message|
  %p= message.upcase

- hanlon :message do
  %h1= yell 'Hey there, Rob'
  %p= 'I wanted to let you know that I just adore your flaming, red mane. You remind me of a confident jungle cat, constantly on the prowl. Hit me up soon, tiger.'
>
end

puts RobGreeter.new.message

Result

<h1><p>HEY THERE, ROB</p></h1>
<p>I wanted to let you know that I just adore your flaming, red mane. You remind me of a confident jungle cat, constantly on the prowl. Hit me up soon, tiger.</p>
Something went wrong with that request. Please try again.