Class: Assist::Player
Instance Attribute Summary collapse
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(username) ⇒ Player
constructor
A new instance of Player.
- #method_missing(name, *args, &block) ⇒ Object
- #profile(force = false) ⇒ Object
Constructor Details
#initialize(username) ⇒ Player
Returns a new instance of Player.
13 14 15 |
# File 'lib/Assist/player.rb', line 13 def initialize(username) self.username = username end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
9 10 11 |
# File 'lib/Assist/player.rb', line 9 def method_missing(name, *args, &block) profile.fetch(name.to_s) { super } end |
Instance Attribute Details
#username ⇒ Object
Returns the value of attribute username.
4 5 6 |
# File 'lib/Assist/player.rb', line 4 def username @username end |
Instance Method Details
#profile(force = false) ⇒ Object
17 18 19 |
# File 'lib/Assist/player.rb', line 17 def profile @get_profile ||= get_profile end |