Class: Protocol::Caldav::Vcard::Card
- Inherits:
-
Struct
- Object
- Struct
- Protocol::Caldav::Vcard::Card
- Defined in:
- lib/protocol/caldav/vcard/card.rb
Instance Attribute Summary collapse
-
#properties ⇒ Object
Returns the value of attribute properties.
Instance Method Summary collapse
- #find_all_properties(prop_name) ⇒ Object
- #find_property(prop_name) ⇒ Object
-
#initialize(properties: []) ⇒ Card
constructor
A new instance of Card.
Constructor Details
#initialize(properties: []) ⇒ Card
Returns a new instance of Card.
11 12 13 |
# File 'lib/protocol/caldav/vcard/card.rb', line 11 def initialize(properties: []) super(properties: properties) end |
Instance Attribute Details
#properties ⇒ Object
Returns the value of attribute properties
10 11 12 |
# File 'lib/protocol/caldav/vcard/card.rb', line 10 def properties @properties end |
Instance Method Details
#find_all_properties(prop_name) ⇒ Object
19 20 21 |
# File 'lib/protocol/caldav/vcard/card.rb', line 19 def find_all_properties(prop_name) properties.select { |p| p.name.casecmp?(prop_name) } end |
#find_property(prop_name) ⇒ Object
15 16 17 |
# File 'lib/protocol/caldav/vcard/card.rb', line 15 def find_property(prop_name) properties.find { |p| p.name.casecmp?(prop_name) } end |