class RSGuitarTech::SavedGame::ScoreAttack::Song
Attributes
high_scores[RW]
id[RW]
picks[RW]
play_count[RW]
timestamp[RW]
Public Class Methods
from(key, json)
click to toggle source
# File lib/rsgt/saved_game/score_attack/song.rb, line 17 def self.from(key, json) self.new( id: key, timestamp: json["TimeStamp"], play_count: json["PlayCount"], picks: json["Badges"], high_scores: json["HighScores"], ) end
new(id:, timestamp:, play_count:, picks:, high_scores:)
click to toggle source
# File lib/rsgt/saved_game/score_attack/song.rb, line 27 def initialize(id:, timestamp:, play_count:, picks:, high_scores:) @id, @timestamp, @play_count, @picks, @high_scores = id, timestamp, play_count, picks, high_scores end
Public Instance Methods
==(other)
click to toggle source
# File lib/rsgt/saved_game/score_attack/song.rb, line 31 def ==(other) return false if other == nil id == other.id end