Sha256: 2f63c6b3d90a69b0231a2870dcb3e8fe018c3d8cf27a645d5865e6ebec6fdb56

Contents?: true

Size: 484 Bytes

Versions: 1

Compression:

Stored size: 484 Bytes

Contents

require_relative 'clear_interface'

module Vedeu
  class RenderInterface
    def self.call(interface)
      new(interface).render
    end

    def initialize(interface)
      @interface = interface
    end

    def render
      out = []
      out << ClearInterface.call(interface)
      interface.lines.each_with_index do |line, index|
        out << interface.origin(index)
        out << line.to_s
      end
      out.join
    end

    private

    attr_reader :interface
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.0.37 lib/vedeu/output/render_interface.rb