Class: Scim::Kit::V2::ResourceType
- Inherits:
-
Object
- Object
- Scim::Kit::V2::ResourceType
- Includes:
- Templatable
- Defined in:
- lib/scim/kit/v2/resource_type.rb
Overview
Represents a ResourceType Schema tools.ietf.org/html/rfc7643#section-6
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#id ⇒ Object
Returns the value of attribute id.
-
#meta ⇒ Object
readonly
Returns the value of attribute meta.
-
#name ⇒ Object
Returns the value of attribute name.
-
#schema ⇒ Object
Returns the value of attribute schema.
-
#schema_extensions ⇒ Object
readonly
Returns the value of attribute schema_extensions.
Class Method Summary collapse
Instance Method Summary collapse
- #add_schema_extension(schema:, required: false) ⇒ Object
-
#initialize(location:) ⇒ ResourceType
constructor
A new instance of ResourceType.
Methods included from Templatable
#as_json, #render, #template_name, #to_h, #to_json
Constructor Details
#initialize(location:) ⇒ ResourceType
Returns a new instance of ResourceType.
18 19 20 21 22 |
# File 'lib/scim/kit/v2/resource_type.rb', line 18 def initialize(location:) = Meta.new('ResourceType', location) .version = .created = .last_modified = nil @schema_extensions = [] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
12 13 14 |
# File 'lib/scim/kit/v2/resource_type.rb', line 12 def description @description end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
13 14 15 |
# File 'lib/scim/kit/v2/resource_type.rb', line 13 def endpoint @endpoint end |
#id ⇒ Object
Returns the value of attribute id.
10 11 12 |
# File 'lib/scim/kit/v2/resource_type.rb', line 10 def id @id end |
#meta ⇒ Object (readonly)
Returns the value of attribute meta.
16 17 18 |
# File 'lib/scim/kit/v2/resource_type.rb', line 16 def end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/scim/kit/v2/resource_type.rb', line 11 def name @name end |
#schema ⇒ Object
Returns the value of attribute schema.
14 15 16 |
# File 'lib/scim/kit/v2/resource_type.rb', line 14 def schema @schema end |
#schema_extensions ⇒ Object (readonly)
Returns the value of attribute schema_extensions.
15 16 17 |
# File 'lib/scim/kit/v2/resource_type.rb', line 15 def schema_extensions @schema_extensions end |
Class Method Details
.build(*args) {|item| ... } ⇒ Object
28 29 30 31 32 |
# File 'lib/scim/kit/v2/resource_type.rb', line 28 def self.build(*args) item = new(*args) yield item item end |
Instance Method Details
#add_schema_extension(schema:, required: false) ⇒ Object
24 25 26 |
# File 'lib/scim/kit/v2/resource_type.rb', line 24 def add_schema_extension(schema:, required: false) @schema_extensions.push(schema: schema, required: required) end |