Class: Protocol::Caldav::Vcard::Card

Inherits:
Struct
  • Object
show all
Defined in:
lib/protocol/caldav/vcard/card.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(properties: []) ⇒ Card

Returns a new instance of Card.



9
10
11
# File 'lib/protocol/caldav/vcard/card.rb', line 9

def initialize(properties: [])
  super(properties: properties)
end

Instance Attribute Details

#propertiesObject

Returns the value of attribute properties

Returns:

  • (Object)

    the current value of properties



8
9
10
# File 'lib/protocol/caldav/vcard/card.rb', line 8

def properties
  @properties
end

Instance Method Details

#find_all_properties(prop_name) ⇒ Object



17
18
19
# File 'lib/protocol/caldav/vcard/card.rb', line 17

def find_all_properties(prop_name)
  properties.select { |p| p.name.casecmp?(prop_name) }
end

#find_property(prop_name) ⇒ Object



13
14
15
# File 'lib/protocol/caldav/vcard/card.rb', line 13

def find_property(prop_name)
  properties.find { |p| p.name.casecmp?(prop_name) }
end