Class: Vpim::Vcard::Line
- Inherits:
-
Object
- Object
- Vpim::Vcard::Line
- Defined in:
- lib/vpim/vcard.rb
Overview
An entry in a vCard. The #value object’s type varies with the kind of line (the #name), and on how the line was encoded. The objects returned for a specific kind of line are often extended so that they support a common set of methods. The goal is to allow all types of objects for a kind of line to be treated with some uniformity, but still allow specific handling for the various value types if desired.
See the specific methods for details.
Instance Attribute Summary collapse
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(group, name, value) ⇒ Line
constructor
:nodoc:.
Constructor Details
#initialize(group, name, value) ⇒ Line
:nodoc:
577 578 579 |
# File 'lib/vpim/vcard.rb', line 577 def initialize(group, name, value) #:nodoc: @group, @name, @value = (group||''), name.to_str, value end |
Instance Attribute Details
#group ⇒ Object (readonly)
Returns the value of attribute group.
573 574 575 |
# File 'lib/vpim/vcard.rb', line 573 def group @group end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
574 575 576 |
# File 'lib/vpim/vcard.rb', line 574 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
575 576 577 |
# File 'lib/vpim/vcard.rb', line 575 def value @value end |
Class Method Details
.decode(decode, card, field) ⇒ Object
:nodoc:
581 582 583 |
# File 'lib/vpim/vcard.rb', line 581 def self.decode(decode, card, field) #:nodoc: card.cache[field] || (card.cache[field] = card.send(decode[field.name], field)) end |