Class: IOSProfile
- Inherits:
-
Object
- Object
- IOSProfile
- Defined in:
- lib/moki_ruby/iosprofile.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#displayName ⇒ Object
Returns the value of attribute displayName.
-
#id ⇒ Object
Returns the value of attribute id.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#lastSeen ⇒ Object
Returns the value of attribute lastSeen.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
2 3 4 |
# File 'lib/moki_ruby/iosprofile.rb', line 2 def description @description end |
#displayName ⇒ Object
Returns the value of attribute displayName.
2 3 4 |
# File 'lib/moki_ruby/iosprofile.rb', line 2 def displayName @displayName end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/moki_ruby/iosprofile.rb', line 2 def id @id end |
#identifier ⇒ Object
Returns the value of attribute identifier.
2 3 4 |
# File 'lib/moki_ruby/iosprofile.rb', line 2 def identifier @identifier end |
#lastSeen ⇒ Object
Returns the value of attribute lastSeen.
2 3 4 |
# File 'lib/moki_ruby/iosprofile.rb', line 2 def lastSeen @lastSeen end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/moki_ruby/iosprofile.rb', line 2 def name @name end |
Class Method Details
.from_hash(input_hash) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/moki_ruby/iosprofile.rb', line 4 def self.from_hash(input_hash) new_profile = self.new %w(id lastSeen name displayName description identifier).each do |attr| new_profile.send("#{ attr }=", input_hash[attr]) end new_profile end |
Instance Method Details
#to_hash ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/moki_ruby/iosprofile.rb', line 13 def to_hash {}.tap do |hash| self.instance_variables.each do |var| hash[var.to_s.delete("@")] = instance_variable_get(var) end end end |