class RSGuitarTech::SavedGame::LearnASong::Song

Attributes

dynamic_difficulty[RW]
id[RW]
play_next_stats[RW]
timestamp[RW]

Public Class Methods

from(key, json) click to toggle source
# File lib/rsgt/saved_game/learn_a_song/song.rb, line 22
def self.from(key, json)
  self.new(
    id:                  key,
    timestamp:           json["TimeStamp"],
    dynamic_difficulty:  json["DynamicDifficulty"],
    play_next_stats:     json["PlaynextStats"]
  )
end
new(id:, timestamp:, dynamic_difficulty:, play_next_stats:) click to toggle source
# File lib/rsgt/saved_game/learn_a_song/song.rb, line 31
def initialize(id:, timestamp:, dynamic_difficulty:, play_next_stats:)
  @id                 = id
  @timestamp          = timestamp
  @dynamic_difficulty = dynamic_difficulty
  @play_next_stats    = play_next_stats
end

Public Instance Methods

==(other) click to toggle source
# File lib/rsgt/saved_game/learn_a_song/song.rb, line 38
def ==(other)
  return false if other == nil

  id == other.id
end