Module: Virginity::FieldValues::Text

Included in:
Anniversary, Birthday, CustomImField, Email, Virginity::Field, Impp, Key, Photo, RelatedNames, Sound, Tel, TextField, Url, XAbAdr, XAbDate, XSoocialRemovedCategory
Defined in:
lib/virginity/vcard/field_values/text.rb

Instance Method Summary collapse

Instance Method Details

#reencode!Object



14
15
16
# File 'lib/virginity/vcard/field_values/text.rb', line 14

def reencode!
  self.text = text
end

#textObject



5
6
7
# File 'lib/virginity/vcard/field_values/text.rb', line 5

def text
  EncodingDecoding::decode_text(@value)
end

#text=(s) ⇒ Object



9
10
11
12
# File 'lib/virginity/vcard/field_values/text.rb', line 9

def text=(s)
  @params.delete_if { |p| p.key == "ENCODING" }
  @value = EncodingDecoding::encode_text(s)
end

#value_to_xmlObject



18
19
20
# File 'lib/virginity/vcard/field_values/text.rb', line 18

def value_to_xml
  xml_element("text", text.strip)
end