Class: Five9::Profile
- Inherits:
-
Object
show all
- Defined in:
- lib/five9/user_resources/profile.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(args) ⇒ Profile
Returns a new instance of Profile.
4
5
6
|
# File 'lib/five9/user_resources/profile.rb', line 4
def initialize(args)
@attributes = AccessibleHash.new(args)
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args) ⇒ Object
13
14
15
|
# File 'lib/five9/user_resources/profile.rb', line 13
def method_missing(method_name, *args)
@attributes.send(method_name, *args)
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
3
4
5
|
# File 'lib/five9/user_resources/profile.rb', line 3
def attributes
@attributes
end
|
Class Method Details
.all ⇒ Object
25
26
27
28
29
|
# File 'lib/five9/user_resources/profile.rb', line 25
def self.all
ProfileManagement.get_user_profiles.map do |profile_info|
self.new(profile_info)
end
end
|
.find(profile_name) ⇒ Object
21
22
23
|
# File 'lib/five9/user_resources/profile.rb', line 21
def self.find(profile_name)
self.new(matching_profile(all, profile_name))
end
|
Instance Method Details
#save ⇒ Object
Also known as:
update!