Sha256: d1fc1ba72c078841256603a82b3060af6a97f37de35f619bdd335880afe02f8a

Contents?: true

Size: 418 Bytes

Versions: 13

Compression:

Stored size: 418 Bytes

Contents

# frozen_string_literal: true

module Stepmod
  module Utils
    module Converters
      class Comment < Stepmod::Utils::Converters::Base
        def convert(node, _state = {})
          comment = node.text.strip.split("\n").map do |line|
            "\n// #{line}"
          end.join("\n")
          "#{comment}\n"
        end
      end

      ReverseAdoc::Converters.register :comment, Comment.new
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
stepmod-utils-0.6.6 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.6.5 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.6.3 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.6.2 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.6.1 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.6.0 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.5.0 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.4.14 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.4.13 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.4.12 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.4.11 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.4.10 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.4.9 lib/stepmod/utils/converters/comment.rb