File: helpers.haml

package info (click to toggle)
ruby-haml 6.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,004 kB
  • sloc: ruby: 9,908; sh: 23; makefile: 11
file content (55 lines) | stat: -rw-r--r-- 1,201 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
= h("&&&&&&&&&&&") # This is an ActionView Helper... should load
- foo = capture do # This ActionView Helper is designed for ERB, but should work with haml
  %div
    %p.title Title
    %p.text
      Woah this is really crazy
      I mean wow,
      man.
- 3.times do
  = foo
%p foo
- tab_up
%p reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeally loooooooooooooooooong
- tab_down
.woah
  #funky
    = capture_haml do
      %div
        %h1 Big!
        %p Small
        / Invisible
    = capture do
      .dilly
        %p foo
        %h1 bar
  = surround '(', ')' do
    %strong parentheses!
= precede '*' do
  %span.small Not really
click
= succeed '.' do
  %a{:href=>"thing"} here
%p baz
- haml_buffer.tabulation = 10
%p boom
- concat "foo\n"
- haml_buffer.tabulation = 0
= list_of({:google => 'http://www.google.com'}) do |name, link|
  %a{ :href => link }= name
%p
  - haml_concat "foo"
  %div
    - haml_concat "bar"
  - haml_concat "boom"
  baz
  - haml_concat "boom, again"
- haml_tag :table do
  - haml_tag :tr do
    - haml_tag :td, {:class => 'cell'} do
      - haml_tag :strong, "strong!"
      - haml_concat "data"
    - haml_tag :td do
      - haml_concat "more_data"
- haml_tag :hr
- haml_tag :div, ''