class Story

Attributes

author[RW]
content[RW]
title[RW]
url[RW]

Public Class Methods

all() click to toggle source
# File lib/NBA_news/story.rb, line 10
def self.all
  @@all
end
find_by_author(name) click to toggle source
# File lib/NBA_news/story.rb, line 18
def self.find_by_author(name)
  self.all.find_all {|story| story.author == name} 
end
list_authors() click to toggle source
# File lib/NBA_news/story.rb, line 14
def self.list_authors
  self.all.map {|story| story.author}
end
new() click to toggle source
# File lib/NBA_news/story.rb, line 6
def initialize
  @@all << self
end