Sha256: 5a8172cb8fe0e06c31aa33c677766ab756ce398248a4d3f76fc9a9c5ffd0bf68

Contents?: true

Size: 710 Bytes

Versions: 120

Compression:

Stored size: 710 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'
require 'avm/files/appendable/resource_base'
require 'eac_templates/directory'

module Avm
  module Files
    module Appendable
      class TemplatizedDirectory < ::Avm::Files::Appendable::ResourceBase
        attr_reader :source_path

        def initialize(appender, source_path)
          super(appender)
          @source_path = source_path
        end

        def write_on(target_dir)
          raise 'Variables source not set' if appender.variables_source.blank?

          ::EacTemplates::Directory.new(source_path).apply(
            appender.variables_source,
            target_dir
          )
        end
      end
    end
  end
end

Version data entries

120 entries across 120 versions & 4 rubygems

Version Path
eac_tools-0.60.2 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.60.1 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.60.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.59.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.58.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.57.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.56.1 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.56.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.55.7 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.55.6 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.55.5 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.55.4 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.55.3 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.55.2 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.55.1 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.55.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.54.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.53.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.52.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.51.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb