Sha256: dfc2d0bf378ed0e6a58ccbc3990da2f5226d401045c92a4d971de68040e4fb9a

Contents?: true

Size: 583 Bytes

Versions: 9

Compression:

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

9 entries across 9 versions & 2 rubygems

Version Path
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/arbre-1.4.0/lib/arbre/html/document.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/arbre-1.4.0/lib/arbre/html/document.rb
arbre-1.4.0 lib/arbre/html/document.rb
arbre-1.3.0 lib/arbre/html/document.rb
arbre-1.2.1 lib/arbre/html/document.rb
arbre-1.2.0 lib/arbre/html/document.rb
arbre-1.2.0.rc1 lib/arbre/html/document.rb
arbre-1.1.1 lib/arbre/html/document.rb
arbre-1.0.3 lib/arbre/html/document.rb