class ArtThroughoutTheYears::WorksofArt
Attributes
description[RW]
title[RW]
Public Class Methods
all()
click to toggle source
# File lib/works_of_art.rb, line 11 def self.all @@all end
find(id)
click to toggle source
# File lib/works_of_art.rb, line 19 def self.find(id) @@all[id-1] end
new(title=nil, description=nil)
click to toggle source
# File lib/works_of_art.rb, line 5 def initialize(title=nil, description=nil) @title = title @description = description @@all << self end
new_from_index_page(r)
click to toggle source
# File lib/works_of_art.rb, line 15 def self.new_from_index_page(r) self.new(art.css("div.MFP-Home-Content-Artwork-Text").text) end