# File 'lib/xml-sitemap/item.rb', line 13definitialize(target,opts={})@target=target.to_s.strip@updated=opts[:updated]||Time.now@priority=opts[:priority]@changefreq=opts[:period]@validate_time=(opts[:validate_time]!=false)# Refer to http://support.google.com/webmasters/bin/answer.py?hl=en&answer=178636 for requirement to support images in sitemap
@image_location=opts[:image_location]@image_caption=opts[:image_caption]@image_geolocation=opts[:image_geolocation]@image_title=opts[:image_title]@image_license=opts[:image_license]# Refer to http://support.google.com/webmasters/bin/answer.py?hl=en&answer=80472&topic=10079&ctx=topic#2 for requirement to support videos in sitemap
@video_thumbnail_location=opts[:video_thumbnail_location]@video_title=opts[:video_title]@video_description=opts[:video_description]@video_content_location=opts[:video_content_location]@video_player_location=opts[:video_player_location]@video_duration=opts[:video_duration]@video_expiration_date=opts[:video_expiration_date]@video_rating=opts[:video_rating]@video_view_count=opts[:video_view_count]@video_publication_date=opts[:video_publication_date]@video_family_friendly=opts[:video_family_friendly]# tag
@video_category=opts[:video_category]@video_restriction=opts[:video_restriction]@video_gallery_location=opts[:video_gallery_location]@video_price=opts[:video_price]@video_requires_subscription=opts[:video_requires_subscription]@video_uploader=opts[:video_uploader]@video_platform=opts[:video_platform]@video_live=opts[:video_live]if@changefreq@changefreq=@changefreq.to_symunlessXmlSitemap::PERIODS.include?(@changefreq)raiseArgumentError,"Invalid :period value '#{@changefreq}'"endendunless@updated.kind_of?(Time)||@updated.kind_of?(Date)||@updated.kind_of?(String)raiseArgumentError,"Time, Date, or ISO8601 String required for :updated!"endif@validate_time&&@updated.kind_of?(String)&&!(@updated=~ISO8601_REGEX)raiseArgumentError,"String provided to :updated did not match ISO8601 standard!"end@updated=@updated.to_timeif@updated.kind_of?(Date)##############################################################################################
##############################################################################################
unless@video_expiration_date.kind_of?(Time)||@video_expiration_date.kind_of?(Date)||@video_expiration_date.kind_of?(String)raiseArgumentError,"Time, Date, or ISO8601 String required for :video_expiration_date!"unless@video_expiration_date.nil?endif@validate_time&&@video_expiration_date.kind_of?(String)&&!(@video_expiration_date=~ISO8601_REGEX)raiseArgumentError,"String provided to :video_expiration_date did not match ISO8601 standard!"end@video_expiration_date=@video_expiration_date.to_timeif@video_expiration_date.kind_of?(Date)##############################################################################################
##############################################################################################
unless@video_publication_date.kind_of?(Time)||@video_publication_date.kind_of?(Date)||@video_publication_date.kind_of?(String)raiseArgumentError,"Time, Date, or ISO8601 String required for :video_publication_date!"unless@video_publication_date.nil?endif@validate_time&&@video_publication_date.kind_of?(String)&&!(@video_publication_date=~ISO8601_REGEX)raiseArgumentError,"String provided to :video_publication_date did not match ISO8601 standard!"end@video_publication_date=@video_publication_date.to_timeif@video_publication_date.kind_of?(Date)end