Sha256: 570f7825787cf156c69bb72c8690f677f0fafd603412e7a80f5dbe3ac0138fe6
Contents?: true
Size: 865 Bytes
Versions: 2
Compression:
Stored size: 865 Bytes
Contents
# encoding: utf-8 # frozen_string_literal: true module Brandish class Configure # A form used for building. Form = Struct.new(:name, :format, :entry, :processors) do # Builds the form. This takes a configure object, and builds the # form based on that. # # @see Configure#roots # @see Processor::Context # @see Processor # @param configure [Configure] The configuration object for this build. # @return [void] def build(configure) context = Processor::Context.new(configure, self) root = configure.roots[configure.sources.find(entry)] processors.each do |(processor, options)| klass = processor.is_a?(::Array) ? Processor.all.fetch(processor) : processor klass.new(context, options) end context.process(root) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
brandish-0.1.3 | lib/brandish/configure/form.rb |
brandish-0.1.2 | lib/brandish/configure/form.rb |