Sha256: de6f2aaf17e11e7991e9f4f90bfb9f7857f000f8e823dbfe0e98245a806772ef
Contents?: true
Size: 703 Bytes
Versions: 17
Compression:
Stored size: 703 Bytes
Contents
module Atom module Extensions class Property include Atom::Xml::Parseable namespace "http://custom.namespace" attribute :name, :value def initialize(name = nil, value = nil) if name && value initialize_with_o :name => name, :value => value else initialize_with_o(name) { yield if block_given? } end end def initialize_with_o(o = nil) case o when String, XML::Reader parse o, :once => true when Hash o.each do |name,value| self.send :"#{name}=", value end else yield(self) if block_given? end end end end end
Version data entries
17 entries across 17 versions & 3 rubygems