Sha256: 6fc35810a217c2370302b916538343760f9b82591fef0814b8073269f862ffae

Contents?: true

Size: 536 Bytes

Versions: 6

Compression:

Stored size: 536 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

6 entries across 6 versions & 1 rubygems

Version Path
rom-factory-0.10.2 lib/rom/factory/attributes/value.rb
rom-factory-0.10.1 lib/rom/factory/attributes/value.rb
rom-factory-0.10.0 lib/rom/factory/attributes/value.rb
rom-factory-0.9.1 lib/rom/factory/attributes/value.rb
rom-factory-0.9.0 lib/rom/factory/attributes/value.rb
rom-factory-0.8.0 lib/rom/factory/attributes/value.rb