Sha256: 28b22d7f72ade6f197056ddccddbbe08699d15ce97c96c265bc82fc6dadc145b
Contents?: true
Size: 579 Bytes
Versions: 1
Compression:
Stored size: 579 Bytes
Contents
module ROM::Factory module Attributes # @api private class Callable attr_reader :name, :dsl, :block # @api private def initialize(name, dsl, block) @name = name @dsl = dsl @block = block end # @api private def call(attrs, *args) result = attrs[name] || dsl.instance_exec(*args, &block) { name => result } end # @api private def value? true end # @api private def dependency_names block.parameters.map(&:last) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rom-factory-0.7.0 | lib/rom/factory/attributes/callable.rb |