class BbcNewsCliGem::FrontPage

Attributes

articles[R]

Public Class Methods

new(link) click to toggle source
# File lib/bbc_news_cli_gem/front_page.rb, line 5
def initialize(link)
  @link = link
  @articles = []
end

Public Instance Methods

display_articles() click to toggle source
# File lib/bbc_news_cli_gem/front_page.rb, line 10
def display_articles
  articles.each_with_index do | article, i |
    puts "#{i+1}. #{article.title}"
  end
end