Sha256: ddbb93300e5606485dfae16ee5af9c65d4de6507c6083ece091df9de9e4d0f06

Contents?: true

Size: 989 Bytes

Versions: 18

Compression:

Stored size: 989 Bytes

Contents

# frozen_string_literal: true

module Dor
  class StaticConfig
    # Represents the configuration for the identifier minter service (suri)
    class SuriConfig
      def initialize(hash)
        @mint_ids = hash.fetch(:mint_ids)
        @pass = hash.fetch(:pass)
        @id_namespace = hash.fetch(:id_namespace)
        @url = hash.fetch(:url)
        @user = hash.fetch(:user)
      end

      def configure(&block)
        instance_eval(&block)
      end

      def mint_ids(new_value = nil)
        @mint_ids = new_value if new_value
        @mint_ids
      end

      def id_namespace(new_value = nil)
        @id_namespace = new_value if new_value
        @id_namespace
      end

      def url(new_value = nil)
        @url = new_value if new_value
        @url
      end

      def user(new_value = nil)
        @user = new_value if new_value
        @user
      end

      def pass(new_value = nil)
        @pass = new_value if new_value
        @pass
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
dor-services-9.6.2 lib/dor/static_config/suri_config.rb
dor-services-9.6.1 lib/dor/static_config/suri_config.rb
dor-services-9.6.0 lib/dor/static_config/suri_config.rb
dor-services-9.5.0 lib/dor/static_config/suri_config.rb
dor-services-9.4.0 lib/dor/static_config/suri_config.rb
dor-services-9.3.0 lib/dor/static_config/suri_config.rb
dor-services-9.2.1 lib/dor/static_config/suri_config.rb
dor-services-9.2.0 lib/dor/static_config/suri_config.rb
dor-services-9.1.0 lib/dor/static_config/suri_config.rb
dor-services-9.0.0 lib/dor/static_config/suri_config.rb
dor-services-8.6.0 lib/dor/static_config/suri_config.rb
dor-services-8.5.0 lib/dor/static_config/suri_config.rb
dor-services-8.4.0 lib/dor/static_config/suri_config.rb
dor-services-8.3.0 lib/dor/static_config/suri_config.rb
dor-services-8.2.0 lib/dor/static_config/suri_config.rb
dor-services-8.1.1 lib/dor/static_config/suri_config.rb
dor-services-8.1.0 lib/dor/static_config/suri_config.rb
dor-services-8.0.0 lib/dor/static_config/suri_config.rb