Class: TopTL::VoteCheck
Instance Attribute Summary
Attributes included from Model
Class Method Summary collapse
Methods included from Model
Class Method Details
.from_hash(data) ⇒ Object
111 112 113 114 115 116 117 118 |
# File 'lib/toptl/types.rb', line 111 def self.from_hash(data) data ||= {} new( voted: (data["voted"] || data["hasVoted"]) == true, voted_at: data["votedAt"], raw: data ) end |