Class: HonStats::Classes::Banlist::Ban
- Inherits:
-
Object
- Object
- HonStats::Classes::Banlist::Ban
- Defined in:
- lib/honstats/ban.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#banned_at ⇒ Object
readonly
Returns the value of attribute banned_at.
-
#banned_id ⇒ Object
readonly
Returns the value of attribute banned_id.
-
#nickname ⇒ Object
readonly
Returns the value of attribute nickname.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(data) ⇒ Ban
constructor
A new instance of Ban.
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_id ⇒ Object (readonly)
Returns the value of attribute account_id.
25 26 27 |
# File 'lib/honstats/ban.rb', line 25 def account_id @account_id end |
#banned_at ⇒ Object (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_id ⇒ Object (readonly)
Returns the value of attribute banned_id.
25 26 27 |
# File 'lib/honstats/ban.rb', line 25 def banned_id @banned_id end |
#nickname ⇒ Object (readonly)
Returns the value of attribute nickname.
25 26 27 |
# File 'lib/honstats/ban.rb', line 25 def nickname @nickname end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
25 26 27 |
# File 'lib/honstats/ban.rb', line 25 def reason @reason end |