Class: Wanikani::User
- Inherits:
-
Object
- Object
- Wanikani::User
- Defined in:
- lib/wanikani/user.rb
Class Method Summary collapse
-
.information ⇒ Hash
Gets the user information from WaniKani.
-
.on_vacation? ⇒ Boolean
Checks if the user is currently in vacation mode.
Class Method Details
.information ⇒ Hash
Gets the user information from WaniKani.
7 8 9 10 |
# File 'lib/wanikani/user.rb', line 7 def self.information api_response = Wanikani.api_response("user-information") return api_response["user_information"] end |
.on_vacation? ⇒ Boolean
Checks if the user is currently in vacation mode.
16 17 18 19 20 |
# File 'lib/wanikani/user.rb', line 16 def self.on_vacation? api_response = Wanikani.api_response("user-information") vacation_date = api_response["user_information"]["vacation_date"] return !vacation_date.nil? end |