Sha256: 03faccd89f384f0cd2793a1d0f4b1c2fd01f2516e4f3aabda144806f969be91a
Contents?: true
Size: 539 Bytes
Versions: 41
Compression:
Stored size: 539 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) def remove = older - older.intersection(newer) private attr_reader :formatter, :older, :newer def format(pragmas) = Array(pragmas).map { |pragma| formatter.new(pragma).call } end end end
Version data entries
41 entries across 41 versions & 1 rubygems