class BackpackTF::User
Constants
- INTERFACE
Attributes
backpack_tf_banned[R]
backpack_tf_group[R]
backpack_tf_reputation[R]
backpack_tf_trust[R]
backpack_update[R]
backpack_value[R]
ban_community[R]
ban_economy[R]
ban_vac[R]
name[R]
notifications[R]
steamid[R]
steamrep_scammer[R]
success[R]
Public Class Methods
new(attr)
click to toggle source
# File lib/backpack_tf/user.rb, line 35 def initialize attr attr = check_attr_keys(attr) @steamid = attr[:steamid] @success = attr[:success] @backpack_value = attr[:backpack_value] @backpack_update = attr[:backpack_update] @name = attr[:name] @backpack_tf_reputation = attr[:backpack_tf_reputation] @backpack_tf_group = attr[:backpack_tf_group] @backpack_tf_banned = attr[:backpack_tf_banned] @backpack_tf_trust = attr[:backpack_tf_trust] @steamrep_scammer = attr[:steamrep_scammer] @ban_economy = attr[:ban_economy] @ban_community = attr[:ban_community] @ban_vac = attr[:ban_vac] @notifications = attr[:notifications] end
players()
click to toggle source
# File lib/backpack_tf/user.rb, line 12 def self.players return @response if response.nil? @@players = response[:players].inject({}) do |players, (steamid, attr)| players[steamid] = new(attr) players end end
response()
click to toggle source
# File lib/backpack_tf/user.rb, line 8 def self.response @response = superclass.responses[to_sym] end