Sha256: 103eddc084b047087e23e93a083ea3ecd8f7f3e54fd709917cfe2d42360892d5

Contents?: true

Size: 500 Bytes

Versions: 2

Compression:

Stored size: 500 Bytes

Contents

#
# tagz.rb doesn't cramp your style, allowing even invalid html to be
# generated.  note the use of the 'tagz' method, which can be used both to
# capture output and to append content to the top of the stack.
#

require 'tagz'
include Tagz.globally

def header
  tagz{
    html_
      body_(:class => 'ninja-like', :id => 'giraffe-slayer')

      ___ "<!-- this is the header -->"
  }
end

def footer
  tagz{
    ___ "<!-- this is the footer -->"

    body_
      html_
  }
end

puts header, footer

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tagz-5.0.1 samples/d.rb
tagz-5.0.0 samples/d.rb