Sha256: 206b22b0ea8a888005f11a0b280e2e3f09795215921383aac3a3bf59fff289a4

Contents?: true

Size: 371 Bytes

Versions: 6

Compression:

Stored size: 371 Bytes

Contents

# frozen_string_literal: true

module RailsBestPractices
  module InlineDisables
    class CommentRipper < Ripper::SexpBuilder
      attr_reader :comments

      def initialize(*arg)
        super
        @comments = []
      end

      def on_comment(*arg)
        # [sexp_type, statement, [lineno, column]] = super
        comments << super
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails_best_practices-1.23.2 lib/rails_best_practices/inline_disables/comment_ripper.rb
rails_best_practices-1.23.1 lib/rails_best_practices/inline_disables/comment_ripper.rb
rails_best_practices-1.23.0 lib/rails_best_practices/inline_disables/comment_ripper.rb
rails_best_practices-1.22.1 lib/rails_best_practices/inline_disables/comment_ripper.rb
rails_best_practices-1.22.0 lib/rails_best_practices/inline_disables/comment_ripper.rb
rails_best_practices-1.21.0 lib/rails_best_practices/inline_disables/comment_ripper.rb