Sha256: e9dfce9362afe9eea783bd54087fabe869ff2544f58130f37894bd85cc8c6bbc
Contents?: true
Size: 1.35 KB
Versions: 12
Compression:
Stored size: 1.35 KB
Contents
# frozen_string_literal: true module Scim module Kit module V2 # Represents an application SCIM configuration. class Configuration # @private class Builder def initialize @resource_types = {} @schemas = {} end def service_provider_configuration(location:) @sp_config = ServiceProviderConfiguration.new(location: location) yield @sp_config end def resource_type(id:, location:) @resource_types[id] ||= ResourceType.new(location: location) @resource_types[id].id = id yield @resource_types[id] end def schema(id:, name:, location:) @schemas[id] ||= Schema.new(id: id, name: name, location: location) yield @schemas[id] end def apply_to(configuration) configuration.service_provider_configuration = @sp_config configuration.resource_types = @resource_types configuration.schemas = @schemas end end attr_accessor :service_provider_configuration attr_accessor :resource_types attr_accessor :schemas def initialize builder = Builder.new yield builder if block_given? builder.apply_to(self) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems