Sha256: 848306c56678a1009bf187ad7199cfe588f8c0af5f8d6ba17360ee31858083b2
Contents?: true
Size: 982 Bytes
Versions: 3
Compression:
Stored size: 982 Bytes
Contents
# frozen_string_literal: true module Scim module Kit module V2 # Represents a SCIM Schema class Schema include Templatable attr_reader :id, :name, :attributes, :meta attr_accessor :description def initialize(id:, name:, location:) @id = id @name = name @description = name @meta = Meta.new('Schema', location) @meta.created = @meta.last_modified = @meta.version = nil @attributes = [] yield self if block_given? end def add_attribute(name:, type: :string) attribute = AttributeType.new(name: name, type: type) yield attribute if block_given? attributes << attribute end def core? id.include?(Schemas::CORE) || id.include?(Messages::CORE) end def self.build(*args) item = new(*args) yield item item end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
scim-kit-0.2.16 | lib/scim/kit/v2/schema.rb |
scim-kit-0.2.15 | lib/scim/kit/v2/schema.rb |
scim-kit-0.2.14 | lib/scim/kit/v2/schema.rb |