Sha256: 417c91aef5652515d36a1e855673628b7e0eb17a570f06ee8a4dde852631b28c

Contents?: true

Size: 857 Bytes

Versions: 14

Compression:

Stored size: 857 Bytes

Contents

module Vedeu

  # Sends the output to the renderers.
  #
  class Output

    # Writes output to the defined renderers.
    #
    # @return [Array|String]
    # @see #initialize
    def self.render(output)
      new(output).render
    end

    # Return a new instance of Vedeu::Output.
    #
    # @param output [Array<Array<Vedeu::Char>>]
    # @return [Output]
    def initialize(output)
      @output = output
    end

    # Send the view to the renderers.
    #
    # @return [Array]
    def render
      if Vedeu::Configuration.drb?
        Vedeu.trigger(:_drb_store_output_, output)

        # Vedeu::Renderers::HTML.to_file(Vedeu::VirtualBuffer.retrieve)
      end

      Vedeu.renderers.render(output)
    end

    protected

    # @!attribute [r] output
    # @return [Array<Array<Vedeu::Char>>]
    attr_reader :output

  end # Output

end # Vedeu

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
vedeu-0.5.4 lib/vedeu/output/output.rb
vedeu-0.5.3 lib/vedeu/output/output.rb
vedeu-0.5.2 lib/vedeu/output/output.rb
vedeu-0.5.1 lib/vedeu/output/output.rb
vedeu-0.5.0 lib/vedeu/output/output.rb
vedeu-0.4.65 lib/vedeu/output/output.rb
vedeu-0.4.64 lib/vedeu/output/output.rb
vedeu-0.4.63 lib/vedeu/output/output.rb
vedeu-0.4.62 lib/vedeu/output/output.rb
vedeu-0.4.61 lib/vedeu/output/output.rb
vedeu-0.4.60 lib/vedeu/output/output.rb
vedeu-0.4.59 lib/vedeu/output/output.rb
vedeu-0.4.58 lib/vedeu/output/output.rb
vedeu-0.4.57 lib/vedeu/output/output.rb