Class: Lotus::Atom::PortableContacts
- Inherits:
-
Object
- Object
- Lotus::Atom::PortableContacts
- Defined in:
- lib/lotus/atom/portable_contacts.rb
Overview
Holds information about the extended contact information in the Feed given in the Portable Contacts specification.
Instance Method Summary collapse
- #anniversary ⇒ Object
- #birthday ⇒ Object
-
#connected ⇒ Object
Returns a boolean that indicates that a bi-directional connection has been established between the user and the contact, if it is able to assert this.
- #display_name ⇒ Object
- #display_name=(value) ⇒ Object
- #gender ⇒ Object
- #gender=(value) ⇒ Object
- #id ⇒ Object
- #id=(value) ⇒ Object
-
#initialize(parent) ⇒ PortableContacts
constructor
Instantiates a Lotus::PortableContacts object from either a given root that contains all <poco:*> tags as an ratom Person or a Hash containing the properties.
- #name ⇒ Object
- #name=(value) ⇒ Object
- #nickname ⇒ Object
- #nickname=(value) ⇒ Object
- #note ⇒ Object
- #note=(value) ⇒ Object
- #preferred_username ⇒ Object
- #preferred_username=(value) ⇒ Object
- #published ⇒ Object
- #updated ⇒ Object
Constructor Details
#initialize(parent) ⇒ PortableContacts
Instantiates a Lotus::PortableContacts object from either a given root that contains all <poco:*> tags as an ratom Person
or a Hash containing the properties.
9 10 11 12 13 14 15 |
# File 'lib/lotus/atom/portable_contacts.rb', line 9 def initialize(parent) if parent.is_a? Hash @options = parent else @parent = parent end end |
Instance Method Details
#anniversary ⇒ Object
47 |
# File 'lib/lotus/atom/portable_contacts.rb', line 47 def anniversary; get_date(:anniversary); end |
#birthday ⇒ Object
46 |
# File 'lib/lotus/atom/portable_contacts.rb', line 46 def birthday; get_date(:birthday); end |
#connected ⇒ Object
Returns a boolean that indicates that a bi-directional connection has been established between the user and the contact, if it is able to assert this.
52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/lotus/atom/portable_contacts.rb', line 52 def connected return @options[:connected] unless @options.nil? str = @parent.poco_connected if str == "true" true elsif str == "false" false else nil end end |
#display_name ⇒ Object
32 |
# File 'lib/lotus/atom/portable_contacts.rb', line 32 def display_name; get_prop(:display_name, 'displayName'); end |
#display_name=(value) ⇒ Object
33 |
# File 'lib/lotus/atom/portable_contacts.rb', line 33 def display_name= value; set_prop(:display_name, value, 'displayName'); end |
#gender ⇒ Object
26 |
# File 'lib/lotus/atom/portable_contacts.rb', line 26 def gender; get_prop(:gender); end |
#gender=(value) ⇒ Object
27 |
# File 'lib/lotus/atom/portable_contacts.rb', line 27 def gender= value; set_prop(:gender, value); end |
#id ⇒ Object
17 |
# File 'lib/lotus/atom/portable_contacts.rb', line 17 def id; get_prop(:id); end |
#id=(value) ⇒ Object
18 |
# File 'lib/lotus/atom/portable_contacts.rb', line 18 def id= value; set_prop(:id, value); end |
#name ⇒ Object
20 |
# File 'lib/lotus/atom/portable_contacts.rb', line 20 def name; get_prop(:name); end |
#name=(value) ⇒ Object
21 |
# File 'lib/lotus/atom/portable_contacts.rb', line 21 def name= value; set_prop(:name, value); end |
#nickname ⇒ Object
23 |
# File 'lib/lotus/atom/portable_contacts.rb', line 23 def nickname; get_prop(:nickname); end |
#nickname=(value) ⇒ Object
24 |
# File 'lib/lotus/atom/portable_contacts.rb', line 24 def nickname= value; set_prop(:nickname, value); end |
#note ⇒ Object
29 |
# File 'lib/lotus/atom/portable_contacts.rb', line 29 def note; get_prop(:note); end |
#note=(value) ⇒ Object
30 |
# File 'lib/lotus/atom/portable_contacts.rb', line 30 def note= value; set_prop(:note, value); end |
#preferred_username ⇒ Object
35 36 37 |
# File 'lib/lotus/atom/portable_contacts.rb', line 35 def preferred_username get_prop(:preferred_username, 'preferredUsername') end |
#preferred_username=(value) ⇒ Object
39 40 41 |
# File 'lib/lotus/atom/portable_contacts.rb', line 39 def preferred_username= value set_prop(:preferred_username, value, 'preferredUsername') end |
#published ⇒ Object
44 |
# File 'lib/lotus/atom/portable_contacts.rb', line 44 def published; get_datetime(:published); end |
#updated ⇒ Object
43 |
# File 'lib/lotus/atom/portable_contacts.rb', line 43 def updated; get_datetime(:updated); end |