Sha256: 2ba25a1688a55f12c6ec1fdd0b6e29608fbd6da8ea3ae3ae17b96ec60e8c308e

Contents?: true

Size: 586 Bytes

Versions: 13

Compression:

Stored size: 586 Bytes

Contents

module Arbre
  module HTML

    class Document < Tag

      def build(*args)
        super
        build_head
        build_body
      end

      def document
        self
      end

      def tag_name
        'html'
      end

      def doctype
        '<!DOCTYPE html>'.html_safe
      end

      def to_s
        doctype + super
      end

      protected

      def build_head
        @head = head do
          meta :"http-equiv" => "Content-type", :content => "text/html; charset=utf-8"
        end
      end

      def build_body
        @body = body
      end
    end

  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
arbre-1.0.2 lib/arbre/html/document.rb
arbre-1.0.1 lib/arbre/html/document.rb
arbre-1.0.0 lib/arbre/html/document.rb
arbre-1.0.0.rc4 lib/arbre/html/document.rb
arbre-1.0.0.rc3 lib/arbre/html/document.rb
arbre-1.0.0.rc2 lib/arbre/html/document.rb
arbre-1.0.0.rc1 lib/arbre/html/document.rb
activeadmin-0.4.4 lib/active_admin/arbre/html/document.rb
activeadmin-0.4.3 lib/active_admin/arbre/html/document.rb
activeadmin-0.4.2 lib/active_admin/arbre/html/document.rb
activeadmin-0.4.1 lib/active_admin/arbre/html/document.rb
activeadmin-0.4.0 lib/active_admin/arbre/html/document.rb
andrewroth_activeadmin-0.3.4.4 lib/active_admin/arbre/html/document.rb