Class: MasteryPage

Inherits:
Object
  • Object
show all
Defined in:
lib/sightstone/masterybook.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (MasteryPage) initialize(data)

Returns a new instance of MasteryPage



16
17
18
19
20
21
22
23
24
# File 'lib/sightstone/masterybook.rb', line 16

def initialize(data)
  @id = data['id']
  @name = data['name']
  @current = data['current']
  @talents = []
  data['talents'].each do |talent|
    @talents << Talent.new(talent)
  end
end

Instance Attribute Details

- (Object) current

Returns the value of attribute current



14
15
16
# File 'lib/sightstone/masterybook.rb', line 14

def current
  @current
end

- (Object) id

Returns the value of attribute id



14
15
16
# File 'lib/sightstone/masterybook.rb', line 14

def id
  @id
end

- (Object) name

Returns the value of attribute name



14
15
16
# File 'lib/sightstone/masterybook.rb', line 14

def name
  @name
end

- (Object) talents

Returns the value of attribute talents



14
15
16
# File 'lib/sightstone/masterybook.rb', line 14

def talents
  @talents
end