Sha256: ed98967be6a2ee3589cdde92cb3cd2c73ab764ae73c9299e989f130a54caae96
Contents?: true
Size: 585 Bytes
Versions: 10
Compression:
Stored size: 585 Bytes
Contents
# frozen_string_literal: true module Pragmater module Parsers # Manages pragma comments. class Comments def initialize older, newer, formatter: Formatters::Main @formatter = formatter @older = format older @newer = format newer end def insert older.union newer end def remove older - older.intersection(newer) end private attr_reader :formatter, :older, :newer def format pragmas Array(pragmas).map { |pragma| formatter.new(pragma).call } end end end end
Version data entries
10 entries across 10 versions & 1 rubygems