class CultureNewsReader::Category
Attributes
articles[RW]
name[RW]
Public Class Methods
all()
click to toggle source
# File lib/culture_news_reader/category.rb, line 11 def self.all @@all end
new(name)
click to toggle source
# File lib/culture_news_reader/category.rb, line 5 def initialize(name) @name = name @@all << self @articles = [] end
Public Instance Methods
add_article(article)
click to toggle source
# File lib/culture_news_reader/category.rb, line 15 def add_article(article) @articles << article end