class Top25::Place
Attributes
location[RW]
name[RW]
num[RW]
url[RW]
Public Class Methods
all()
click to toggle source
# File lib/top25/place.rb, line 11 def self.all @@all end
create_from_collection(arr)
click to toggle source
# File lib/top25/place.rb, line 15 def self.create_from_collection(arr) arr.each do |hash| self.new(hash) end end
new(attr_hash)
click to toggle source
# File lib/top25/place.rb, line 4 def initialize(attr_hash) #{name: "", location: "", :address =>""} attr_hash.each do |attribute, v| self.send("#{attribute}=",v) end @@all << self end