Sha256: 2abc9656c709dbd1a54f3ead8d50620e3303573909e16b09b409309f1af54033

Contents?: true

Size: 474 Bytes

Versions: 2

Compression:

Stored size: 474 Bytes

Contents

require 'vedeu/output/clear_interface'

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

    def initialize(interface)
      @interface = interface
    end

    def render
      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

2 entries across 2 versions & 1 rubygems

Version Path
vedeu-0.0.41 lib/vedeu/output/render_interface.rb
vedeu-0.0.40 lib/vedeu/output/render_interface.rb