Class: HonStats::Classes::LastMatch

Inherits:
Object
  • Object
show all
Defined in:
lib/honstats/character.rb

Overview

Consilidated last match stats

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dateObject (readonly)

Returns the value of attribute date.



214
215
216
# File 'lib/honstats/character.rb', line 214

def date
  @date
end

#idObject (readonly)

Returns the value of attribute id.



214
215
216
# File 'lib/honstats/character.rb', line 214

def id
  @id
end