Class: Nexus::MPage

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ MPage

Returns a new instance of MPage.



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

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

	@masteries = Array.new()

	if(params["masteries"] != nil)	
		params["masteries"].each do |m|
			@masteries.push(Nexus.get_mastery_by_id(m["id"]))
		end
	else
		@masteries = []
	end
end

Instance Attribute Details

#currentObject (readonly)

Returns the value of attribute current.



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

def current
  @current
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#slotsObject (readonly)

Returns the value of attribute slots.



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

def slots
  @slots
end