Sha256: 4bb51b3fd1eec54cb63a1f1f3596bc02d88cfda68dc88827756318e2621fefe9

Contents?: true

Size: 573 Bytes

Versions: 15

Compression:

Stored size: 573 Bytes

Contents

# frozen_string_literal: true

module Vedeu

  module Renderers

    # Writes the given output to a file.
    #
    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

15 entries across 15 versions & 1 rubygems

Version Path
vedeu-0.8.23 lib/vedeu/renderers/support/file.rb
vedeu-0.8.22 lib/vedeu/renderers/support/file.rb
vedeu-0.8.21 lib/vedeu/renderers/support/file.rb
vedeu-0.8.20 lib/vedeu/renderers/support/file.rb
vedeu-0.8.19 lib/vedeu/renderers/support/file.rb
vedeu-0.8.18 lib/vedeu/renderers/support/file.rb
vedeu-0.8.17 lib/vedeu/renderers/support/file.rb
vedeu-0.8.16 lib/vedeu/renderers/support/file.rb
vedeu-0.8.15 lib/vedeu/renderers/support/file.rb
vedeu-0.8.14 lib/vedeu/renderers/support/file.rb
vedeu-0.8.13 lib/vedeu/renderers/file.rb
vedeu-0.8.12 lib/vedeu/renderers/file.rb
vedeu-0.8.10 lib/vedeu/renderers/file.rb
vedeu-0.8.9 lib/vedeu/renderers/file.rb
vedeu-0.8.8 lib/vedeu/renderers/file.rb