Class: PubgRb::Profile
- Inherits:
-
Object
- Object
- PubgRb::Profile
- Defined in:
- lib/pubg_rb/profile.rb
Instance Attribute Summary collapse
-
#accountid ⇒ Object
readonly
Returns the value of attribute accountid.
-
#avatar ⇒ Object
readonly
Returns the value of attribute avatar.
-
#defaultseason ⇒ Object
readonly
Returns the value of attribute defaultseason.
-
#lastupdated ⇒ Object
readonly
Returns the value of attribute lastupdated.
-
#matchhistory ⇒ Object
readonly
Returns the value of attribute matchhistory.
-
#platformid ⇒ Object
readonly
Returns the value of attribute platformid.
-
#playername ⇒ Object
readonly
Returns the value of attribute playername.
-
#pubgtrackerid ⇒ Object
readonly
Returns the value of attribute pubgtrackerid.
-
#seasondisplay ⇒ Object
readonly
Returns the value of attribute seasondisplay.
-
#selectedregion ⇒ Object
readonly
Returns the value of attribute selectedregion.
-
#stats ⇒ Object
readonly
Returns the value of attribute stats.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Profile
constructor
A new instance of Profile.
Constructor Details
#initialize(opts = {}) ⇒ Profile
Returns a new instance of Profile.
4 5 6 7 |
# File 'lib/pubg_rb/profile.rb', line 4 def initialize(opts={}) opts.each { |k,v| instance_variable_set("@#{k.downcase}", v) } instance_variable_set("@lastupdated", DateTime.parse(self.lastupdated[0..18])) end |
Instance Attribute Details
#accountid ⇒ Object (readonly)
Returns the value of attribute accountid.
3 4 5 |
# File 'lib/pubg_rb/profile.rb', line 3 def accountid @accountid end |
#avatar ⇒ Object (readonly)
Returns the value of attribute avatar.
3 4 5 |
# File 'lib/pubg_rb/profile.rb', line 3 def avatar @avatar end |
#defaultseason ⇒ Object (readonly)
Returns the value of attribute defaultseason.
3 4 5 |
# File 'lib/pubg_rb/profile.rb', line 3 def defaultseason @defaultseason end |
#lastupdated ⇒ Object (readonly)
Returns the value of attribute lastupdated.
3 4 5 |
# File 'lib/pubg_rb/profile.rb', line 3 def lastupdated @lastupdated end |
#matchhistory ⇒ Object (readonly)
Returns the value of attribute matchhistory.
3 4 5 |
# File 'lib/pubg_rb/profile.rb', line 3 def matchhistory @matchhistory end |
#platformid ⇒ Object (readonly)
Returns the value of attribute platformid.
3 4 5 |
# File 'lib/pubg_rb/profile.rb', line 3 def platformid @platformid end |
#playername ⇒ Object (readonly)
Returns the value of attribute playername.
3 4 5 |
# File 'lib/pubg_rb/profile.rb', line 3 def playername @playername end |
#pubgtrackerid ⇒ Object (readonly)
Returns the value of attribute pubgtrackerid.
3 4 5 |
# File 'lib/pubg_rb/profile.rb', line 3 def pubgtrackerid @pubgtrackerid end |
#seasondisplay ⇒ Object (readonly)
Returns the value of attribute seasondisplay.
3 4 5 |
# File 'lib/pubg_rb/profile.rb', line 3 def seasondisplay @seasondisplay end |
#selectedregion ⇒ Object (readonly)
Returns the value of attribute selectedregion.
3 4 5 |
# File 'lib/pubg_rb/profile.rb', line 3 def selectedregion @selectedregion end |
#stats ⇒ Object (readonly)
Returns the value of attribute stats.
3 4 5 |
# File 'lib/pubg_rb/profile.rb', line 3 def stats @stats end |