rdodson41/ruby-lox

View on GitHub
lib/lox/formatter.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module Lox
  class Formatter
    attr_reader :objects

    def initialize(objects)
      @objects = objects
    end

    def each(&block)
      objects.lazy.map(&:inspect).each(&block)
    end
  end
end