Sha256: afc43ea962ed5c6a1648ba843c4839f19679ef9d52c45cb527fc3043b7484fb5

Contents?: true

Size: 933 Bytes

Versions: 1

Compression:

Stored size: 933 Bytes

Contents

module Lolxin
  class LeagueItemDto
    attr_accessor(*%i(
      rank
      hot_streak
      mini_series
      wins
      veteran
      losses
      player_or_team_name
      player_or_team_id
      inactive
      fresh_blood
      league_points
    ))

    def initialize(data)
      @data = data
      initialize_with(data)
    end

    private

    def initialize_with(data)
      @rank                = data['rank']
      @hot_streak          = data['hotStreak']
      @mini_series         = MiniSeriesDto.new(data['miniSeries'])
      @wins                = data['wins']
      @veteran             = data['veteran']
      @losses              = data['losses']
      @player_or_team_id   = data['playerOrTeamId']
      @player_or_team_name = data['playerOrTeamName']
      @inactive            = data['inactive']
      @fresh_blood         = data['freshBlood']
      @league_points       = data['leaguePoints']
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lolxin-0.13.0 lib/lolxin/dto/league_item_dto.rb