class Demacia::Page
Represents a rune page
Attributes
current[RW]
name[RW]
talents[RW]
Public Class Methods
new(name, current, talents)
click to toggle source
Constructor, initializes the page with a name and a current Params:
name
-
The page's name
current
-
A boolean that tells us if this is the currently used page
# File lib/demacia/Page.rb, line 10 def initialize(name, current, talents) @name = name @current = current @talents = talents end
Public Instance Methods
to_s()
click to toggle source
# File lib/demacia/Page.rb, line 16 def to_s is_used = current ? "yes" : "no" return_string = "\nTalent page name:\t"+@name+ "\nCurrently used:\t"+is_used+ "\nTalents :\n" talents.each do |talent| return_string << "\t"+ talent.to_s end end