Class: Twitch::BitsLeader

Inherits:
Object
  • Object
show all
Defined in:
lib/twitch/bits_leader.rb

Overview

A user that is a leader for bits.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ BitsLeader

Returns a new instance of BitsLeader.



16
17
18
19
20
21
# File 'lib/twitch/bits_leader.rb', line 16

def initialize(attributes = {})
  @user_id = attributes['user_id']
  @user_name = attributes['user_name']
  @rank = attributes['rank']
  @score = attributes['score']
end

Instance Attribute Details

#rankObject (readonly)

Ranking of the user giving bits. Reflects the parent object’s date range.



12
13
14
# File 'lib/twitch/bits_leader.rb', line 12

def rank
  @rank
end

#scoreObject (readonly)

Number of bits given in the parent object’s date range.



14
15
16
# File 'lib/twitch/bits_leader.rb', line 14

def score
  @score
end

#user_idObject (readonly)

ID of the user giving bits.



7
8
9
# File 'lib/twitch/bits_leader.rb', line 7

def user_id
  @user_id
end

#user_nameObject (readonly)

Display name of the user giving bits.



9
10
11
# File 'lib/twitch/bits_leader.rb', line 9

def user_name
  @user_name
end