Sha256: 17daf055d0625e84fbbf025312c472a38cbf9d454c2c6f82074fd8dfd22b26ce
Contents?: true
Size: 792 Bytes
Versions: 6
Compression:
Stored size: 792 Bytes
Contents
require "vobject/component" require "vobject/vcard/v4_0/property" require "vobject/vcard/v4_0/grammar" require "pp" module Vcard::V4_0 class Component < Vobject::Component class << self def parse(vcf, strict) hash = Vcard::V4_0::Grammar.new(strict).parse(vcf) comp_name = hash.keys.first new comp_name, hash[comp_name], hash[:errors] end private def raise_invalid_parsing raise "vCard parse failed" end end private def property_base_class version_class.const_get(:Property) end def component_base_class version_class.const_get(:Component) end def parameter_base_class version_class.const_get(:Parameter) end def version_class Vcard::V4_0 end end end
Version data entries
6 entries across 6 versions & 2 rubygems