Sha256: 79ff9adb24accda4e3438a6cc38aa655c9d9fbffc1e3fb2684de2fe06ed261dd

Contents?: true

Size: 534 Bytes

Versions: 3

Compression:

Stored size: 534 Bytes

Contents

# frozen_string_literal: true

module ROM::Factory
  module Attributes
    # @api private
    class Value
      attr_reader :name, :value

      # @api private
      def initialize(name, value)
        @name = name
        @value = value
      end

      # @api private
      def call(attrs = EMPTY_HASH)
        return if attrs.key?(name)

        {name => value}
      end

      # @api private
      def value?
        true
      end

      # @api private
      def dependency_names
        EMPTY_ARRAY
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rom-factory-0.13.0 lib/rom/factory/attributes/value.rb
rom-factory-0.12.0 lib/rom/factory/attributes/value.rb
rom-factory-0.11.0 lib/rom/factory/attributes/value.rb