Class: SkypeApi::Profile

Inherits:
User
  • Object
show all
Defined in:
lib/skype_api/profile.rb

Constant Summary collapse

COMMAND =
"PROFILE"

Constants inherited from User

User::ADD_TO_CONTACT, User::AUTHORISATION_PENDING, User::DELETE_FROM_CONTACT, User::METHOD_NAMES, User::NOT_IN_CONTACT

Instance Attribute Summary

Attributes inherited from User

#about, #birthday, #buddystatus, #city, #fullname, #homepage, #language, #name, #phone_home, #phone_mobile, #phone_office, #province, #sex

Instance Method Summary collapse

Methods inherited from User

#authorisation, #fifo, #get, #initialize, #to_s

Constructor Details

This class inherits a constructor from SkypeApi::User

Instance Method Details

#update(text) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/skype_api/profile.rb', line 8

def update(text)
  destination, property, *value = text.split
  property = "@#{property.downcase}".to_sym
  value = value.join(' ')
  if query_validate(destination, property)
    self.instance_variable_set property, /^\d+$/.match(value) ? value.to_i : value
  end
  self
end