class Brawlhalla::API::LegendStat

Constants

ATTRIBUTES

Public Class Methods

new(json) click to toggle source
# File lib/brawlhalla/api/legend_stat.rb, line 15
def initialize(json)
  ATTRIBUTES.each do |attr|
    value = json[attr]
    value = value.to_i if attr.to_s.start_with?('damage')

    send("#{attr}=", value)
  end
end