Sha256: 9ba4084240d821091d189a8c9c297b6fa8ded0295e29cdec0dcf8fe5ddb57d21

Contents?: true

Size: 383 Bytes

Versions: 10

Compression:

Stored size: 383 Bytes

Contents

# frozen_string_literal: true

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

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
stepmod-utils-0.3.5 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.3.4 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.3.2 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.3.1 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.3.0 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.2.7 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.2.6 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.2.5 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.2.4 lib/stepmod/utils/converters/comment.rb
stepmod-utils-0.2.3 lib/stepmod/utils/converters/comment.rb