Sha256: b4b945208a7ac211f90f379d9dfa22cde96f92b739671bbe14f143385316b6d2
Contents?: true
Size: 463 Bytes
Versions: 50
Compression:
Stored size: 463 Bytes
Contents
# frozen_string_literal: true module Pragmater module Processors # Removes existing pragma comments. class Remover def initialize comments, body @comments = comments @body = body end def call body.first.then do |first_line| body.delete_at 0 if first_line == "\n" && comments.empty? comments + body end end private attr_reader :comments, :body end end end
Version data entries
50 entries across 50 versions & 1 rubygems