Sha256: 785577a20e678c79b04d1314f65566ddbc5598e82a56d3d091a2d8568bcca935

Contents?: true

Size: 540 Bytes

Versions: 10

Compression:

Stored size: 540 Bytes

Contents

module Eloqua
  module Builder

    module Templates

      extend ActiveSupport::Concern

      included do
        class_attribute :builder_templates
        self.builder_templates = {}
      end

      module ClassMethods

        def builder_template(name, *args)
          template = builder_templates[name]
          Proc.new do |xml|
            template.call(xml, *args)
          end
        end

        def define_builder_template(name, &block)
          builder_templates[name] = block
        end
      end

    end


  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
eloqua-1.2.4 lib/eloqua/builder/templates.rb
eloqua-1.2.3 lib/eloqua/builder/templates.rb
eloqua-1.2.2 lib/eloqua/builder/templates.rb
eloqua-1.2.1 lib/eloqua/builder/templates.rb
eloqua-1.2.0 lib/eloqua/builder/templates.rb
eloqua-1.1.4 lib/eloqua/builder/templates.rb
eloqua-1.1.3 lib/eloqua/builder/templates.rb
eloqua-1.1.2 lib/eloqua/builder/templates.rb
eloqua-1.1.1 lib/eloqua/builder/templates.rb
eloqua-1.1.0 lib/eloqua/builder/templates.rb