Sha256: 25eb1edaece86c6ce80c9524574194eafe042306a8ff62791d338830d303e538
Contents?: true
Size: 453 Bytes
Versions: 52
Compression:
Stored size: 453 Bytes
Contents
# frozen_string_literal: true module Pragmater module Processors # Inserts new pragma comments. class Inserter def initialize comments, body @comments = comments @body = body end def call body.first.then do |first| comments.append "\n" unless first == "\n" || body.empty? comments + body end end private attr_reader :comments, :body end end end
Version data entries
52 entries across 52 versions & 1 rubygems