Class: NewsFireExport::Group
- Inherits:
-
Object
- Object
- NewsFireExport::Group
- Defined in:
- lib/newsfire_export.rb
Constant Summary collapse
- @@num_untitled =
0
Instance Attribute Summary collapse
-
#feeds ⇒ Object
Returns the value of attribute feeds.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #add_feed(feed) ⇒ Object
-
#initialize(hash, feedlist) ⇒ Group
constructor
A new instance of Group.
- #to_s ⇒ Object
Constructor Details
#initialize(hash, feedlist) ⇒ Group
Returns a new instance of Group.
89 90 91 92 93 94 95 96 97 |
# File 'lib/newsfire_export.rb', line 89 def initialize hash,feedlist @name=hash['name'] @name="Untitled group #{@@num_untitled+=1}" if @name.nil? @feedlist=feedlist @feeds = Hash.new hash['conditionsArray'].each do |feed| @feeds[feed['friendlyFileName']]=nil end end |
Instance Attribute Details
#feeds ⇒ Object
Returns the value of attribute feeds.
87 88 89 |
# File 'lib/newsfire_export.rb', line 87 def feeds @feeds end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
87 88 89 |
# File 'lib/newsfire_export.rb', line 87 def name @name end |
Instance Method Details
#add_feed(feed) ⇒ Object
98 99 |
# File 'lib/newsfire_export.rb', line 98 def add_feed feed end |
#to_s ⇒ Object
100 101 102 103 |
# File 'lib/newsfire_export.rb', line 100 def to_s return "" if @feedlist.filter and @name=~/^_/ to_opml end |