Sha256: 7da4ae8aff9a43430a09166a1fc1d2d75efa3192690ba18877796a560475c052

Contents?: true

Size: 328 Bytes

Versions: 6

Compression:

Stored size: 328 Bytes

Contents

$:.unshift( "../lib" )
require 'capcode'
require 'capcode/render/xml'

module Capcode
  class Index < Route '/'
    def get
      render :xml => :index
    end
  end  
end

module Capcode::Views
  def index
    xml? :version => '1.0'
    html do
      body do
        h1 "Hello XML !"
      end
    end
  end
end

Capcode.run( )

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
Capcode-0.8.9 examples/render-xml.rb
Capcode-0.8.8 examples/render-xml.rb
Capcode-0.8.7 examples/render-xml.rb
Capcode-0.8.6 examples/render-xml.rb
Capcode-0.8.5 examples/render-xml.rb
Capcode-0.8.4 examples/render-xml.rb