Class: HonStats::Classes::LastMatch
- Inherits:
-
Object
- Object
- HonStats::Classes::LastMatch
- Defined in:
- lib/honstats/character.rb
Overview
Consilidated last match stats
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(data) ⇒ LastMatch
constructor
A new instance of LastMatch.
Constructor Details
#initialize(data) ⇒ LastMatch
Returns a new instance of LastMatch.
216 217 218 219 |
# File 'lib/honstats/character.rb', line 216 def initialize(data) @id = HonStats::API.get_data("match_id", data).to_i @date = Time.parse(HonStats::API.get_data("mdt", data).to_s) end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
214 215 216 |
# File 'lib/honstats/character.rb', line 214 def date @date end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
214 215 216 |
# File 'lib/honstats/character.rb', line 214 def id @id end |