Sha256: 6c0d0bf5a6077f76acdfac16c1ab0a2446836ed9cc698f3c0bc186d1a57c5e34

Contents?: true

Size: 875 Bytes

Versions: 2

Compression:

Stored size: 875 Bytes

Contents

module ThinRest
  module Representations
    class Page < Erector::Widget
      def render(&block)
        rawtext %Q{<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">}
        html :xmlns => "http://www.w3.org/1999/xhtml", :"xml:lang" => "en" do
          head do
            meta :"http-equiv" => "Content-Type", :content => "text/html;charset=UTF-8"
            title title_text
            head_content
          end
          body do
            body_content(&block)
          end
        end
      end

      protected
      def head_content
      end

      def title_text
        "Thin Rest"
      end

      def body_content(&block)
        yield(self)
      end

      def path
        helpers.rack_request.path_info
      end

      def script_elements
      end

      def link_elements
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pivotal-screw-unit-0.4.0 vendor/js-test-core/vendor/thin-rest/lib/thin_rest/representations/page.html.rb
pivotal-screw-unit-0.4.1 vendor/js-test-core/vendor/thin-rest/lib/thin_rest/representations/page.html.rb