Class: Nexus::RPage

Inherits:
Object
  • Object
show all
Defined in:
lib/nexus/model/runes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ RPage

Returns a new instance of RPage.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/nexus/model/runes.rb', line 19

def initialize(params)
	@id = params["id"]
	@name = params["name"]
	@current = params["current"]

	@runes = Array.new()

	if(params["slots"] != nil)	
		params["slots"].each do |r|
			@runes.push(Nexus.get_rune_by_id(r["runeId"]))
		end
	else
		@runes = []
	end
end

Instance Attribute Details

#currentObject (readonly)

Returns the value of attribute current.



17
18
19
# File 'lib/nexus/model/runes.rb', line 17

def current
  @current
end

#idObject (readonly)

Returns the value of attribute id.



17
18
19
# File 'lib/nexus/model/runes.rb', line 17

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



17
18
19
# File 'lib/nexus/model/runes.rb', line 17

def name
  @name
end

#runesObject (readonly)

Returns the value of attribute runes.



17
18
19
# File 'lib/nexus/model/runes.rb', line 17

def runes
  @runes
end