Sha256: 29a31ba7c50c02023e894eca2d34ea12fda9ccbd6a0582667af18d53e8c3f2b6

Contents?: true

Size: 537 Bytes

Versions: 3

Compression:

Stored size: 537 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), '..')

require 'site/template_error'

module BuildMaster

class ElementProcessorByName
  def initialize(templatelets)
    @templatelets = templatelets
  end
  
  def process(target_element, template_element, source_instance)
    templatelet = @templatelets[template_element.name]
    raise TemplateError.new(template_element), "Cannot process element by name #{template_element.name}" unless templatelet
    templatelet.process(target_element, template_element, source_instance)
  end
end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
BuildMaster-1.0.6 lib/buildmaster/site/element_processor_by_name.rb
BuildMaster-1.0.9 lib/buildmaster/site/element_processor_by_name.rb
BuildMaster-1.1.9 lib/buildmaster/site/element_processor_by_name.rb