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.8.5 lib/isodoc/function/reqt.rb
isodoc-2.8.4 lib/isodoc/function/reqt.rb
isodoc-2.8.3 lib/isodoc/function/reqt.rb
isodoc-2.8.2 lib/isodoc/function/reqt.rb
isodoc-2.8.1 lib/isodoc/function/reqt.rb
isodoc-2.8.0 lib/isodoc/function/reqt.rb
isodoc-2.7.4 lib/isodoc/function/reqt.rb
isodoc-2.7.3 lib/isodoc/function/reqt.rb
isodoc-2.7.2 lib/isodoc/function/reqt.rb
isodoc-2.7.1 lib/isodoc/function/reqt.rb
isodoc-2.7.0 lib/isodoc/function/reqt.rb
isodoc-2.6.6 lib/isodoc/function/reqt.rb
isodoc-2.6.5 lib/isodoc/function/reqt.rb
isodoc-2.6.4 lib/isodoc/function/reqt.rb
isodoc-2.6.3 lib/isodoc/function/reqt.rb
isodoc-2.6.2 lib/isodoc/function/reqt.rb
isodoc-2.6.1 lib/isodoc/function/reqt.rb
isodoc-2.6.0 lib/isodoc/function/reqt.rb
isodoc-2.5.10 lib/isodoc/function/reqt.rb
isodoc-2.5.9 lib/isodoc/function/reqt.rb