Class: Scim::Kit::V2::Configuration::Builder
- Inherits:
-
Object
- Object
- Scim::Kit::V2::Configuration::Builder
- Defined in:
- lib/scim/kit/v2/configuration.rb
Instance Attribute Summary collapse
- #configuration ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(configuration) ⇒ Builder
constructor
A new instance of Builder.
- #resource_type(id:, location:) {|| ... } ⇒ Object
- #schema(id:, name:, location:) {|| ... } ⇒ Object
- #service_provider_configuration(location:) {|configuration.service_provider_configuration| ... } ⇒ Object
Constructor Details
#initialize(configuration) ⇒ Builder
Returns a new instance of Builder.
12 13 14 |
# File 'lib/scim/kit/v2/configuration.rb', line 12 def initialize(configuration) @configuration = configuration end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
10 11 12 |
# File 'lib/scim/kit/v2/configuration.rb', line 10 def configuration @configuration end |
Instance Method Details
#resource_type(id:, location:) {|| ... } ⇒ Object
22 23 24 25 26 27 |
# File 'lib/scim/kit/v2/configuration.rb', line 22 def resource_type(id:, location:) configuration.resource_types[id] ||= ResourceType.new(location: location) configuration.resource_types[id].id = id yield configuration.resource_types[id] end |
#schema(id:, name:, location:) {|| ... } ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/scim/kit/v2/configuration.rb', line 29 def schema(id:, name:, location:) configuration.schemas[id] ||= Schema.new( id: id, name: name, location: location ) yield configuration.schemas[id] end |
#service_provider_configuration(location:) {|configuration.service_provider_configuration| ... } ⇒ Object
16 17 18 19 20 |
# File 'lib/scim/kit/v2/configuration.rb', line 16 def service_provider_configuration(location:) configuration.service_provider_configuration = ServiceProviderConfiguration.new(location: location) yield configuration.service_provider_configuration end |