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.12.0 sub/avm-tools/sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
avm-tools-0.126.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.11.1 sub/avm-tools/sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
avm-tools-0.125.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.11.0 sub/avm-tools/sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
avm-tools-0.124.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.10.0 sub/avm-tools/sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
avm-tools-0.123.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.9.0 sub/avm-tools/sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
avm-tools-0.122.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.8.0 sub/avm-tools/sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.7.0 sub/avm-tools/sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.6.0 sub/avm-tools/sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
avm-tools-0.121.2 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.5.0 sub/avm-tools/sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.4.0 sub/avm-tools/sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.3.0 sub/avm-tools/sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
eac_tools-0.2.2 sub/avm-tools/sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
avm-tools-0.121.1 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb
avm-tools-0.121.0 sub/avm-files/lib/avm/files/appendable/templatized_directory.rb