Class: FeedMe::StrictParserBuilder
- Inherits:
-
ParserBuilder
- Object
- ParserBuilder
- FeedMe::StrictParserBuilder
- Defined in:
- lib/feedme.rb
Instance Attribute Summary collapse
-
#feed_ext_tags ⇒ Object
Returns the value of attribute feed_ext_tags.
-
#item_ext_tags ⇒ Object
Returns the value of attribute item_ext_tags.
-
#rels ⇒ Object
Returns the value of attribute rels.
Attributes inherited from ParserBuilder
#aliases, #atom_entry_tags, #atom_tags, #date_tags, #default_transformation, #default_value_tags, #html_helper_lib, #options, #rss_item_tags, #rss_tags, #transformation_fns, #transformations, #value_tags
Instance Method Summary collapse
- #all_atom_tags ⇒ Object
- #all_rss_tags ⇒ Object
-
#initialize(options = {}) ⇒ StrictParserBuilder
constructor
A new instance of StrictParserBuilder.
Methods inherited from ParserBuilder
#emulate_atom!, #emulate_rss!, #parse
Constructor Details
#initialize(options = {}) ⇒ StrictParserBuilder
Returns a new instance of StrictParserBuilder.
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/feedme.rb', line 219 def initialize(={}) super() # rss tags @rss_tags = [ { :image => [ :url, :title, :link, :width, :height, :description ], :textinput => [ :title, :description, :name, :link ], :skiphours => [ :hour ], :skipdays => [ :day ], :items => [ { :rdf_seq => [ :rdf_li ] }, :rdf_seq ], #:item => @item_tags }, :title, :link, :description, # required :language, :copyright, :managingeditor, :webmaster, # optional :pubdate, :lastbuilddate, :category, :generator, :docs, :cloud, :ttl, :rating, :image, :textinput, :skiphours, :skipdays, :item, # have subtags :items ] @rss_item_tags = [ {}, :title, :description, # required :link, :author, :category, :comments, :enclosure, # optional :guid, :pubdate, :source, :expirationdate ] #atom tags = [ :name, :uri, :email ] @atom_tags = [ { :author => , :contributor => , #:entry => @entry_tags }, :id, :author, :title, :updated, # required :category, :contributor, :generator, :icon, :logo, # optional :link, :rights, :subtitle ] @atom_entry_tags = [ { :author => , :contributor => }, :id, :author, :title, :updated, :summary, # required :category, :content, :contributor, :link, :published, :rights, :source ] @rels = { :link => [ 'self', 'alternate', 'edit', 'replies', 'related', 'enclosure', 'via' ] } # extensions @feed_ext_tags = [ :dc_date, :feedburner_browserfriendly, :itunes_author, :itunes_category ] @item_ext_tags = [ :dc_date, :dc_subject, :dc_creator, :dc_title, :dc_rights, :dc_publisher, :trackback_ping, :trackback_about, :feedburner_origlink, :media_content, :content_encoded ] end |
Instance Attribute Details
#feed_ext_tags ⇒ Object
Returns the value of attribute feed_ext_tags.
217 218 219 |
# File 'lib/feedme.rb', line 217 def @feed_ext_tags end |
#item_ext_tags ⇒ Object
Returns the value of attribute item_ext_tags.
217 218 219 |
# File 'lib/feedme.rb', line 217 def @item_ext_tags end |
#rels ⇒ Object
Returns the value of attribute rels.
217 218 219 |
# File 'lib/feedme.rb', line 217 def rels @rels end |
Instance Method Details
#all_atom_tags ⇒ Object
297 298 299 300 301 |
# File 'lib/feedme.rb', line 297 def = + ( or []) [0][:entry] = + ( or []) return end |
#all_rss_tags ⇒ Object
291 292 293 294 295 |
# File 'lib/feedme.rb', line 291 def = + ( or []) [0][:item] = + ( or []) return end |