Sha256: 7affcd7671edd1d9773023cc3060c4929389925bb75c1c757a599045396c9291

Contents?: true

Size: 598 Bytes

Versions: 9

Compression:

Stored size: 598 Bytes

Contents

# frozen_string_literal: true

module Vedeu

  module Renderers

    # Writes the given output to a file.
    #
    # @api private
    #
    class File

      include Vedeu::Renderers::Options

      # Render the output (either content or clearing) to a file.
      #
      # @return [String]
      def write
        data = content

        ::File.write(filename, data)

        data
      end

      private

      # @return [String]
      def content
        output
      end

      # @return [Boolean]
      def write_file?
        true
      end

    end # File

  end # Renderers

end # Vedeu

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
vedeu-0.8.32 lib/vedeu/renderers/support/file.rb
vedeu-0.8.31 lib/vedeu/renderers/support/file.rb
vedeu-0.8.30 lib/vedeu/renderers/support/file.rb
vedeu-0.8.29 lib/vedeu/renderers/support/file.rb
vedeu-0.8.28 lib/vedeu/renderers/support/file.rb
vedeu-0.8.27 lib/vedeu/renderers/support/file.rb
vedeu-0.8.26 lib/vedeu/renderers/support/file.rb
vedeu-0.8.25 lib/vedeu/renderers/support/file.rb
vedeu-0.8.24 lib/vedeu/renderers/support/file.rb