Class: Raggle::Feed::List

Class | Raggle::Feed::List
In: | raggle (CVS)
Parent: | Object

Raggle::Feed::List object. The list which contains all of the feeds and feed items for Raggle.

### Methods

<< [] add categories category delete describe each each_index each_with_index edit get invalidate move_down move_up new size sort

### Attributes

feeds | [RW] |

### Public Class methods

new()

Raggle::Feed::List constructor.

Example:

      feeds = Feed::list.new

### Public Instance methods

<<(feed)

Append a feed to this feed list.

Example:

      feeds << feed

[](*n)

Get a feed by id.

add(title, url, refresh, lock_title=false, save_items=false, site='', desc='', items=[], image = nil, category = nil, force=false, priority=0, max_items=nil)

Add a new feed to this feed list.

Note: the parameters of this method will change in the near future.

Example:

      feeds.add('pablotron', 'http://www.pablotron.org/rss/', 120)

categories()

Get a list of available categories, sorted alphabetically.

Note: categories are case-insensitive.

Example:

      feeds.categories #=> ["News", "Blog"]

category(cat = 'all')

Return a list of feeds in the given category.

delete(id)

Delete a feed by id (index).

Raises an exception if the ID is invalid.

describe(id)

Print out description of feed in description window (Ncurses interface).

each() {|feed| ...}

Iterate over every feed.

each_index() {|i| ...}

Iterate over every feed index.

each_with_index() {|feed, i| ...}

Iterate over every feed with its index.

edit(id, opts)

Edit a feed by ID. Raises an exception if the ID is invalid.

get(id)

Get a feed by id (index).

Raises an exception if the ID is invalid.

invalidate(id)

Mark a feed for updating.

Raises an exception if the ID is invalid.

move_down(id)

Move a feed down in the feed list. Wraps to top at bottom of list.

move_up(id)

Move a feed up in the feed list. Wraps to bottom at top of list.

size()

Return the number of feeds in this Raggle::Feed::List object.

Example:

      feeds.size #=> 100

sort()

Sort feeds by priority then title (case-insensitive).

[Validate]