Sha256: 5389409f3a15566920add8c55a79bb4289d13906ef6fd0d1edda8f4aa92893c8

Contents?: true

Size: 366 Bytes

Versions: 1

Compression:

Stored size: 366 Bytes

Contents

class Disambiguator
  attr_reader :emitters

  def initialize(emitters)
    @emitters = emitters
  end

  def disambiguate!
    emitters.replace_each! do |emitter|
      disambiguate(emitter)
    end
  end

  private

  def disambiguate(emitter)
    if emitter.respond_to?(:disambiguate)
      emitter.disambiguate(emitters)
    else
      emitter
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stamp-0.6.0 lib/stamp/disambiguator.rb