Class: SimpleSpotify::Model::PlayEvent

Inherits:
Object
  • Object
show all
Includes:
Resource
Defined in:
lib/simplespotify/models/playevent.rb

Instance Method Summary collapse

Methods included from Resource

included

Constructor Details

#initialize(data) ⇒ PlayEvent

Returns a new instance of PlayEvent.



12
13
14
15
# File 'lib/simplespotify/models/playevent.rb', line 12

def initialize data
  data[:played_at] = Time.parse(data[:played_at]) if data[:played_at].is_a? String
  super data
end