Sha256: 4d5d78e1e98fb1270eda2212de56cd4dd5acda7f505a09163ed7e12de7783dd6

Contents?: true

Size: 640 Bytes

Versions: 1

Compression:

Stored size: 640 Bytes

Contents

# frozen_string_literal: true

# ObjectIdentifier::Identifier manages construction of identification outputs
# using the passed in formatter_class.
class ObjectIdentifier::Identifier
  # NOTE: `kargs` may be specific to the Formatter being called.
  def self.call(
        objects,
        *attributes,
        formatter_class: default_formatter_class,
        **formatter_options)
    formatter_class.(objects, *attributes, **formatter_options)
  end

  def self.default_formatter_class
    ObjectIdentifier.configuration.formatter_class
  end

  def self.default_attributes
    ObjectIdentifier.configuration.default_attributes
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
object_identifier-0.5.0 lib/object_identifier/identifier.rb