Sha256: 2aacdb43ed6785717d3106b99ea33a7c83ed3db831bfa7d7a2bce592e5091438

Contents?: true

Size: 448 Bytes

Versions: 3

Compression:

Stored size: 448 Bytes

Contents

module Conglomerate
  module DatumBuilder
    include Conglomerate::ParticleBuilder

    builds Conglomerate::Datum

    module BuildOverride
      def build(attrs = {})
        item = objects.first
        val = item.send(_builder_name) if item

        attrs = {
          :name => _builder_name,
          :value => val
        }.merge(attrs)

        super(attrs)
      end
    end

    value :name
    value :value
    value :prompt
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
conglomerate-0.12.0 lib/conglomerate/datum_builder.rb
conglomerate-0.11.1 lib/conglomerate/datum_builder.rb
conglomerate-0.11.0 lib/conglomerate/datum_builder.rb