Module: Unlearn::GitHubAPI::Token
- Defined in:
- lib/unlearn/github_api/token.rb
Constant Summary collapse
- @@token =
nil
Class Method Summary collapse
Class Method Details
.get ⇒ Object
10 11 12 |
# File 'lib/unlearn/github_api/token.rb', line 10 def self.get @@token end |
.is_valid?(token) ⇒ Boolean
14 15 16 |
# File 'lib/unlearn/github_api/token.rb', line 14 def self.is_valid?(token) !!token.match(/^[a-f0-9]{40}$/) end |
.set(token) ⇒ Object
6 7 8 |
# File 'lib/unlearn/github_api/token.rb', line 6 def self.set(token) @@token = token end |