Class: Scim::Kit::V2::Supportable
- Inherits:
-
Object
- Object
- Scim::Kit::V2::Supportable
- Includes:
- DynamicAttributes, Templatable
- Defined in:
- lib/scim/kit/v2/supportable.rb
Overview
Represents a Feature
Instance Attribute Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*dynamic_attributes) ⇒ Supportable
constructor
A new instance of Supportable.
Methods included from DynamicAttributes
#method_missing, #respond_to_missing?
Methods included from Templatable
#as_json, #render, #template_name, #to_h, #to_json
Constructor Details
#initialize(*dynamic_attributes) ⇒ Supportable
Returns a new instance of Supportable.
13 14 15 16 17 18 19 |
# File 'lib/scim/kit/v2/supportable.rb', line 13 def initialize(*dynamic_attributes) dynamic_attributes.delete(:supported) @dynamic_attributes = Hash[ dynamic_attributes.map { |x| ["#{x}=".to_sym, nil] } ] @supported = false end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Scim::Kit::DynamicAttributes
Instance Attribute Details
#supported ⇒ Object
11 12 13 |
# File 'lib/scim/kit/v2/supportable.rb', line 11 def supported @supported end |
Class Method Details
.from(hash) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/scim/kit/v2/supportable.rb', line 22 def from(hash) x = new(*hash.keys) hash.each do |key, value| x.public_send("#{key}=", value) end x end |