Class: Github::Auth::Key
- Inherits:
-
Struct
- Object
- Struct
- Github::Auth::Key
- Defined in:
- lib/github/auth/key.rb
Overview
Represents a username/key pair from GitHub
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key
4 5 6 |
# File 'lib/github/auth/key.rb', line 4 def key @key end |
#username ⇒ Object
Returns the value of attribute username
4 5 6 |
# File 'lib/github/auth/key.rb', line 4 def username @username end |
Instance Method Details
#to_a ⇒ Object
5 6 7 |
# File 'lib/github/auth/key.rb', line 5 def to_a [self] end |
#to_s ⇒ Object
9 10 11 |
# File 'lib/github/auth/key.rb', line 9 def to_s "#{key} #{url}" end |
#url ⇒ Object
13 14 15 |
# File 'lib/github/auth/key.rb', line 13 def url "https://github.com/#{username}" end |