class Org
Attributes
abbreviation[RW]
city[RW]
division[RW]
founding[RW]
id[RW]
name[RW]
stadium[RW]
Public Class Methods
all()
click to toggle source
# File lib/hockey_orgs/org.rb, line 17 def self.all @@all end
get_arena(input)
click to toggle source
# File lib/hockey_orgs/org.rb, line 21 def self.get_arena(input) #these are pretty straight forward i like to think puts "The #{@@all[input].name} play at the #{@@all[input].stadium} in #{@@all[input].city}." end
get_division(input)
click to toggle source
# File lib/hockey_orgs/org.rb, line 29 def self.get_division(input) puts "The #{@@all[input].name} play in the #{@@all[input].division} Division of the NHL." end
get_founding(input)
click to toggle source
# File lib/hockey_orgs/org.rb, line 25 def self.get_founding(input) puts "The #{@@all[input].name} were founded in #{@@all[input].founding}." end
new(id, name, abbreviation, stadium, city, founding, division)
click to toggle source
# File lib/hockey_orgs/org.rb, line 6 def initialize(id, name, abbreviation, stadium, city, founding, division) @id = id @name = name @abbreviation = abbreviation @stadium = stadium @city = city @founding = founding @division = division @@all << self end