Class: Token
Constant Summary
Constants included from Constants
Constants::HOURS_ACHIEVEMENT, Constants::HOURS_CHALLENGE, Constants::HOURS_NEEDED, Constants::SECRET_42, Constants::UID_42, Constants::URL_42
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize ⇒ Token
Returns a new instance of Token.
67 68 69 70 |
# File 'lib/ft_42.rb', line 67 def initialize client = OAuth2::Client.new(UID_42, SECRET_42, site: URL_42) @token = client.client_credentials.get_token end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
65 66 67 |
# File 'lib/ft_42.rb', line 65 def token @token end |