Sha256: 10121ef59316319a7a9067e2feb6a44e41640bb0f5b66c7bec349cea6ddbc486

Contents?: true

Size: 498 Bytes

Versions: 15

Compression:

Stored size: 498 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

15 entries across 15 versions & 2 rubygems

Version Path
ahoward-tagz-5.1.0 samples/d.rb
ahoward-tagz-6.0.0 samples/d.rb
ahoward-tagz-7.0.0 samples/d.rb
ahoward-tagz-7.1.0 samples/d.rb
tagz-9.0.0 samples/d.rb
tagz-8.2.0 samples/d.rb
tagz-8.1.0 samples/d.rb
tagz-8.0.0 samples/d.rb
tagz-7.2.2 samples/d.rb
tagz-7.2.3 samples/d.rb
tagz-7.2.1 samples/d.rb
tagz-7.2.0 samples/d.rb
tagz-6.0.0 samples/d.rb
tagz-7.0.0 samples/d.rb
tagz-7.1.0 samples/d.rb