Sha256: 157c6f5946297a7363d7640dc66272cb8264404f185520fe939c120db71941ac

Contents?: true

Size: 1.21 KB

Versions: 47

Compression:

Stored size: 1.21 KB

Contents

module IsoDoc
  module Function
    module Blocks
      def recommendation_name(name, out)
        return if name.nil?

        out.p class: "RecommendationTitle" do |p|
          name.children.each { |n| parse(n, p) }
        end
      end

      def reqt_attrs(node, klass)
        attr_code(class: klass, id: node["id"], style: keep_style(node))
      end

      def recommendation_parse(node, out)
        out.div **reqt_attrs(node, "recommend") do |t|
          recommendation_parse1(node, t)
        end
      end

      def recommendation_parse1(node, out)
        recommendation_name(node.at(ns("./name")), out)
        node.children.each do |n|
          parse(n, out) unless n.name == "name"
        end
      end

      def requirement_parse(node, out)
        out.div **reqt_attrs(node, "require") do |t|
          recommendation_parse1(node, t)
        end
      end

      def permission_parse(node, out)
        out.div **reqt_attrs(node, "permission") do |t|
          recommendation_parse1(node, t)
        end
      end

      def div_parse(node, out)
        out.div **reqt_attrs(node, node["type"]) do |t|
          node.children.each do |n|
            parse(n, t)
          end
        end
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
isodoc-2.12.1 lib/isodoc/function/reqt.rb
isodoc-2.12.0 lib/isodoc/function/reqt.rb
isodoc-2.11.4 lib/isodoc/function/reqt.rb
isodoc-2.11.3 lib/isodoc/function/reqt.rb
isodoc-2.11.2 lib/isodoc/function/reqt.rb
isodoc-2.11.1 lib/isodoc/function/reqt.rb
isodoc-2.11.0 lib/isodoc/function/reqt.rb
isodoc-2.10.7 lib/isodoc/function/reqt.rb
isodoc-2.10.6 lib/isodoc/function/reqt.rb
isodoc-2.10.5 lib/isodoc/function/reqt.rb
isodoc-2.10.4 lib/isodoc/function/reqt.rb
isodoc-2.10.3 lib/isodoc/function/reqt.rb
isodoc-2.10.2 lib/isodoc/function/reqt.rb
isodoc-2.10.1 lib/isodoc/function/reqt.rb
isodoc-2.10.0 lib/isodoc/function/reqt.rb
isodoc-2.9.4 lib/isodoc/function/reqt.rb
isodoc-2.9.3 lib/isodoc/function/reqt.rb
isodoc-2.9.2 lib/isodoc/function/reqt.rb
isodoc-2.9.1 lib/isodoc/function/reqt.rb
isodoc-2.9.0 lib/isodoc/function/reqt.rb