class PlayGOT::House
Attributes
ancestral_weapons[RW]
name[RW]
region[RW]
titles[RW]
words[RW]
Public Class Methods
all()
click to toggle source
# File lib/play_GOT/house.rb, line 14 def self.all @@all end
find(i)
click to toggle source
# File lib/play_GOT/house.rb, line 26 def self.find(i) @@chosen = self.all[i - 1] end
list_all()
click to toggle source
# File lib/play_GOT/house.rb, line 19 def self.list_all self.all.each.with_index(1) do |h, i| puts "#{i} - #{h.name}".blue end end
new(house_attributes)
click to toggle source
# File lib/play_GOT/house.rb, line 6 def initialize(house_attributes) house_attributes.each do |k, v| self.send("#{k}=", v) end @@all << self end