class Portal
Attributes
name[RW]
topic[RW]
url[RW]
Public Class Methods
all()
click to toggle source
# File lib/portal.rb, line 10 def self.all @@all end
find_or_create_by_url(url)
click to toggle source
# File lib/portal.rb, line 14 def self.find_or_create_by_url(url) if Portal.all.detect{|portal| url == portal.url} @portal = Portal.all.detect{|portal| url == portal.url} else @portal = Portal.new(url) @portal end end
new(url)
click to toggle source
# File lib/portal.rb, line 5 def initialize(url) @url = url @@all << self end