Class: HonStats::Classes::Banlist::Ban

Inherits:
Object
  • Object
show all
Defined in:
lib/honstats/ban.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Ban

Returns a new instance of Ban.



27
28
29
30
31
32
33
# File 'lib/honstats/ban.rb', line 27

def initialize(data)
  @account_id =     HonStats::API.get_data("account_id", data).to_i
  @banned_id =      HonStats::API.get_data("banned_id", data).to_i
  @nickname =       HonStats::API.get_data("nickname", data).to_s
#  				@reason =         HonStats::API.get_data("reason", data).to_s
#	  			@banned_at =      Time.parse(HonStats::API.get_data("ban_date", data).to_s)
end

Instance Attribute Details

#account_idObject (readonly)

Returns the value of attribute account_id.



25
26
27
# File 'lib/honstats/ban.rb', line 25

def 
  @account_id
end

#banned_atObject (readonly)

Returns the value of attribute banned_at.



25
26
27
# File 'lib/honstats/ban.rb', line 25

def banned_at
  @banned_at
end

#banned_idObject (readonly)

Returns the value of attribute banned_id.



25
26
27
# File 'lib/honstats/ban.rb', line 25

def banned_id
  @banned_id
end

#nicknameObject (readonly)

Returns the value of attribute nickname.



25
26
27
# File 'lib/honstats/ban.rb', line 25

def nickname
  @nickname
end

#reasonObject (readonly)

Returns the value of attribute reason.



25
26
27
# File 'lib/honstats/ban.rb', line 25

def reason
  @reason
end