Sha256: 05573b4f3eb89550590a742fb527537bdf5784308f51049d729cc00bde227647

Contents?: true

Size: 910 Bytes

Versions: 7

Compression:

Stored size: 910 Bytes

Contents

class ErectorTemplate < Erector::Widget
  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

7 entries across 7 versions & 1 rubygems

Version Path
garterbelt-0.1.1 spec/performance/templates/erector.rb
garterbelt-0.1.0 spec/performance/templates/erector.rb
garterbelt-0.0.9 spec/performance/templates/erector.rb
garterbelt-0.0.8 spec/performance/templates/erector.rb
garterbelt-0.0.7 spec/performance/templates/erector.rb
garterbelt-0.0.6 spec/performance/templates/erector.rb
garterbelt-0.0.5 spec/performance/templates/erector.rb