Sha256: 7710af4614053826cb0d942b0cf1a712667fe5a8adb84d3c724b526fe57356b9

Contents?: true

Size: 907 Bytes

Versions: 3

Compression:

Stored size: 907 Bytes

Contents

class GarterbeltTemplate < Garterbelt::View
  needs :user, :flash => nil
  
  def content
    html do
      head do
        title "Benchmarking Templates"
        link :rel => 'stylesheet', :href => '/stylesheet/application.css'
        link :rel => 'stylesheet', :href => '/stylesheet/ie.css'
      end
      
      body :class => self.class.to_s.underscore do
        div :id => :wrapper, :class => 'line' do
          if flash
            div :id => 'flash', :class => 'inner' do
              text flash
            end
          end
          
          dl :class => ['inner', 'user_info'] do
            dt 'username'
            dd user.username
            
            dt 'email'
            dd user.email
            
            dt 'name'
            dd user.name
            
            dt 'number of assigned tasks'
            dd rand(20)
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
garterbelt-0.0.4 spec/benchmark/templates/garterbelt.rb
garterbelt-0.0.3 spec/benchmark/templates/garterbelt.rb
garterbelt-0.0.2 spec/benchmark/templates/garterbelt.rb