Class: League
- Inherits:
-
Object
- Object
- League
- Defined in:
- lib/sightstone/league.rb
Instance Attribute Summary (collapse)
-
- (Object) entries
Returns the value of attribute entries.
-
- (Object) name
Returns the value of attribute name.
-
- (Object) queue
Returns the value of attribute queue.
-
- (Object) tier
Returns the value of attribute tier.
-
- (Object) timestamp
Returns the value of attribute timestamp.
Instance Method Summary (collapse)
-
- (League) initialize(data)
constructor
A new instance of League.
Constructor Details
- (League) initialize(data)
Returns a new instance of League
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/sightstone/league.rb', line 4 def initialize(data) @name = data['name'] @queue = data['queue'] @tier = data['tier'] @timestamp = data['timestamp'] @entries = [] data['entries'].each do |entry| @entries << LeagueItem.new(entry) end end |
Instance Attribute Details
- (Object) entries
Returns the value of attribute entries
2 3 4 |
# File 'lib/sightstone/league.rb', line 2 def entries @entries end |
- (Object) name
Returns the value of attribute name
2 3 4 |
# File 'lib/sightstone/league.rb', line 2 def name @name end |
- (Object) queue
Returns the value of attribute queue
2 3 4 |
# File 'lib/sightstone/league.rb', line 2 def queue @queue end |
- (Object) tier
Returns the value of attribute tier
2 3 4 |
# File 'lib/sightstone/league.rb', line 2 def tier @tier end |
- (Object) timestamp
Returns the value of attribute timestamp
2 3 4 |
# File 'lib/sightstone/league.rb', line 2 def @timestamp end |