Sha256: fa1f9b051e256c20722b6ed4f67c98a8e845f128b564130fce864f726d2c51b5

Contents?: true

Size: 494 Bytes

Versions: 43

Compression:

Stored size: 494 Bytes

Contents

# frozen_string_literal: true

module Stepmod
  module Utils
    module Converters
      class Arm < ReverseAdoc::Converters::Base
        def convert(node, state = {})
          treat_children(node, state)
        end

        private

        def treat_children(node, state)
          res = node.children.map { |child| treat(child, state) }
          res.map(&:strip).reject(&:empty?).join("\n\n")
        end
      end

      ReverseAdoc::Converters.register :arm, Arm.new
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
stepmod-utils-0.4.8 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.4.7 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.4.6 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.4.5 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.4.2 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.4.1 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.4.0 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.3.37 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.3.36 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.3.35 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.3.34 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.3.33 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.3.32 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.3.31 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.3.30 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.3.29 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.3.28 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.3.27 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.3.26 lib/stepmod/utils/converters/arm.rb
stepmod-utils-0.3.25 lib/stepmod/utils/converters/arm.rb