Sha256: af434fa8d3c2f1a37cfacd9518d742d9b30b485c3687c8e605721f49d1963a19

Contents?: true

Size: 483 Bytes

Versions: 4

Compression:

Stored size: 483 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 && item.respond_to?(_builder_name)

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

        super(attrs)
      end
    end

    value :name
    value :value
    value :prompt
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
conglomerate-0.16.0 lib/conglomerate/datum_builder.rb
conglomerate-0.15.0 lib/conglomerate/datum_builder.rb
conglomerate-0.14.0 lib/conglomerate/datum_builder.rb
conglomerate-0.12.1 lib/conglomerate/datum_builder.rb