Class: TinyNews::Feed

Inherits:
Object
  • Object
show all
Defined in:
lib/tinynews/feed.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, url) ⇒ Feed

Returns a new instance of Feed.



8
9
10
11
12
13
# File 'lib/tinynews/feed.rb', line 8

def initialize title, url
  @title = title
  @feed_url = url
  
  @stories = download_stories
end

Instance Attribute Details

#storiesObject (readonly)

Returns the value of attribute stories.



6
7
8
# File 'lib/tinynews/feed.rb', line 6

def stories
  @stories
end

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'lib/tinynews/feed.rb', line 6

def title
  @title
end