Class: Syndication::Atom::Feed

Inherits:
Container show all
Includes:
Google
Defined in:
lib/syndication/atom.rb,
lib/syndication/google.rb

Overview

Represents a parsed Atom feed, as returned by Syndication::Atom::Parser.

Instance Attribute Summary collapse

Attributes included from Google

#gd_where

Instance Method Summary collapse

Methods included from Google

#gd_when, #gd_when=

Methods inherited from Container

#initialize, #parse_date, #store, #store_category, #strip, #tag2method, #tag_end, #tag_start

Constructor Details

This class inherits a constructor from Syndication::Container

Instance Attribute Details

#authorObject

Author of feed as a Syndication::Person object.



318
319
320
# File 'lib/syndication/atom.rb', line 318

def author
  @author
end

#categoriesObject (readonly)

Array of Syndication::Category objects representing taxonomic categories for the feed.



323
324
325
# File 'lib/syndication/atom.rb', line 323

def categories
  @categories
end

#contributorsObject (readonly)

Array of Syndication::Person objects representing contributors.



325
326
327
# File 'lib/syndication/atom.rb', line 325

def contributors
  @contributors
end

#entriesObject (readonly)

Array of Syndication::Entry objects representing the entries in the feed.



320
321
322
# File 'lib/syndication/atom.rb', line 320

def entries
  @entries
end

#generatorObject

Software which generated feed as a String.



308
309
310
# File 'lib/syndication/atom.rb', line 308

def generator
  @generator
end

#iconObject

URI of icon to represent channel as a String.



310
311
312
# File 'lib/syndication/atom.rb', line 310

def icon
  @icon
end

#idObject

Globally unique ID of feed as a String.



312
313
314
# File 'lib/syndication/atom.rb', line 312

def id
  @id
end

#infoObject

Atom 0.3 info element (obsolete)



329
330
331
# File 'lib/syndication/atom.rb', line 329

def info
  @info
end

Array of Syndication::Link objects representing various types of link.



327
328
329
# File 'lib/syndication/atom.rb', line 327

def links
  @links
end

#logoObject

URI of logo for channel as a String.



314
315
316
# File 'lib/syndication/atom.rb', line 314

def 
  @logo
end

#rightsObject

Copyright or other rights information as a String.



316
317
318
# File 'lib/syndication/atom.rb', line 316

def rights
  @rights
end

#subtitleObject

Subtitle of feed as a Syndication::Data object.



304
305
306
# File 'lib/syndication/atom.rb', line 304

def subtitle
  @subtitle
end

#titleObject

Title of feed as a Syndication::Data object.



302
303
304
# File 'lib/syndication/atom.rb', line 302

def title
  @title
end

#updatedObject

Last update date/time as a DateTime object if it can be parsed, a String otherwise.



380
381
382
# File 'lib/syndication/atom.rb', line 380

def updated
  parse_date(@updated)
end

Instance Method Details

#category=(obj) ⇒ Object

Add a Syndication::Category value to the feed



347
348
349
350
351
352
# File 'lib/syndication/atom.rb', line 347

def category=(obj)
  if !defined? @categories
    @categories = Array.new
  end
  @categories.push(obj)
end

#contributor=(obj) ⇒ Object

Add a Syndication::Person contributor to the feed



363
364
365
366
367
368
# File 'lib/syndication/atom.rb', line 363

def contributor=(obj)
  if !defined? @contributors
    @contributors = Array.new
  end
  @contributors.push(obj)
end

#copyright=(x) ⇒ Object

For Atom 0.3 compatibility



337
338
339
# File 'lib/syndication/atom.rb', line 337

def copyright=(x)
  @rights = x
end

#entry=(obj) ⇒ Object

Add a Syndication::Entry to the feed



355
356
357
358
359
360
# File 'lib/syndication/atom.rb', line 355

def entry=(obj)
  if !defined? @entries
    @entries = Array.new
  end
  @entries.push(obj)
end

#link=(obj) ⇒ Object

Add a Syndication::Link to the feed



371
372
373
374
375
376
# File 'lib/syndication/atom.rb', line 371

def link=(obj)
  if !defined? @links
    @links = Array.new
  end
  @links.push(obj)
end

#modified=(x) ⇒ Object

For Atom 0.3 compatibility



342
343
344
# File 'lib/syndication/atom.rb', line 342

def modified=(x)
  @updated = x
end

#tagline=(x) ⇒ Object

For Atom 0.3 compatibility



332
333
334
# File 'lib/syndication/atom.rb', line 332

def tagline=(x)
  @subtitle = x
end