Class: Scim::Kit::V2::Configuration
- Inherits:
-
Object
- Object
- Scim::Kit::V2::Configuration
- Defined in:
- lib/scim/kit/v2/configuration.rb
Overview
Represents an application SCIM configuration.
Defined Under Namespace
Classes: Builder
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(http: Scim::Kit::Http.new) {|Builder.new(self)| ... } ⇒ Configuration
constructor
A new instance of Configuration.
- #load_from(base_url) ⇒ Object
Constructor Details
#initialize(http: Scim::Kit::Http.new) {|Builder.new(self)| ... } ⇒ Configuration
Returns a new instance of Configuration.
43 44 45 46 47 48 49 |
# File 'lib/scim/kit/v2/configuration.rb', line 43 def initialize(http: Scim::Kit::Http.new) @http = http @resource_types = {} @schemas = {} yield Builder.new(self) if block_given? end |
Instance Attribute Details
#resource_types ⇒ Object
40 41 42 |
# File 'lib/scim/kit/v2/configuration.rb', line 40 def resource_types @resource_types end |
#schemas ⇒ Object
41 42 43 |
# File 'lib/scim/kit/v2/configuration.rb', line 41 def schemas @schemas end |
#service_provider_configuration ⇒ Object
39 40 41 |
# File 'lib/scim/kit/v2/configuration.rb', line 39 def service_provider_configuration @service_provider_configuration end |
Instance Method Details
#load_from(base_url) ⇒ Object
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/scim/kit/v2/configuration.rb', line 51 def load_from(base_url) base_url = "#{base_url}/" uri = URI.join(base_url, 'ServiceProviderConfig') json = http.get(uri) self.service_provider_configuration = ServiceProviderConfiguration.parse(json, json) load_items(base_url, 'Schemas', Schema, schemas) load_items(base_url, 'ResourceTypes', ResourceType, resource_types) end |