main
 1# frozen_string_literal: true
 2
 3module Scim
 4  module Kit
 5    module V2
 6      # Represents a Feature
 7      class Supportable
 8        include Templatable
 9        include DynamicAttributes
10
11        attr_accessor :supported
12
13        def initialize(*dynamic_attributes)
14          dynamic_attributes.delete(:supported)
15          @dynamic_attributes = Hash[
16            dynamic_attributes.map { |x| ["#{x}=".to_sym, nil] }
17          ]
18          @supported = false
19        end
20
21        class << self
22          def from(hash)
23            x = new(*hash.keys)
24            hash.each do |key, value|
25              x.public_send("#{key}=", value)
26            end
27            x
28          end
29        end
30      end
31    end
32  end
33end