class Article
> Handles Article
object creation¶ ↑
Attributes
Public Class Methods
all()
click to toggle source
create_from_collection(articles_array)
click to toggle source
featured()
click to toggle source
new(article_hash)
click to toggle source
> Creates new Article
objects¶ ↑
# File lib/crowder_news/article.rb, line 16 def initialize(article_hash) @title = article_hash[:title] @link = article_hash[:link] @excerpt = article_hash[:excerpt] @type = article_hash[:type] if @type.downcase == "recent" @@recents << self elsif @type.downcase == "featured" @@featured << self end @@all << self; end
Public Instance Methods
add_details(details_hash)
click to toggle source