Class: RunePage

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

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (RunePage) initialize(data)

Returns a new instance of RunePage



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

def initialize(data)
  @id = data['id']
  @name = data['name']
  @current = data['current']
  @slots = {}
  data['slots'].each do |slot|
    @slots[slot['runeSlotId']] = Rune.new(slot['rune'])
  end
end

Instance Attribute Details

- (Object) current

Returns the value of attribute current



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

def current
  @current
end

- (Object) id

Returns the value of attribute id



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

def id
  @id
end

- (Object) name

Returns the value of attribute name



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

def name
  @name
end

- (Object) slots

Returns the value of attribute slots



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

def slots
  @slots
end