Class: Nexus::MPage
- Inherits:
-
Object
- Object
- Nexus::MPage
- Defined in:
- lib/nexus/model/masteries.rb
Instance Attribute Summary collapse
-
#current ⇒ Object
readonly
Returns the value of attribute current.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#slots ⇒ Object
readonly
Returns the value of attribute slots.
Instance Method Summary collapse
-
#initialize(params) ⇒ MPage
constructor
A new instance of MPage.
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
#current ⇒ Object (readonly)
Returns the value of attribute current.
17 18 19 |
# File 'lib/nexus/model/masteries.rb', line 17 def current @current end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
17 18 19 |
# File 'lib/nexus/model/masteries.rb', line 17 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
17 18 19 |
# File 'lib/nexus/model/masteries.rb', line 17 def name @name end |
#slots ⇒ Object (readonly)
Returns the value of attribute slots.
17 18 19 |
# File 'lib/nexus/model/masteries.rb', line 17 def slots @slots end |