Class: Yello::Auth
- Inherits:
-
Struct
- Object
- Struct
- Yello::Auth
- Defined in:
- lib/yello/auth.rb,
lib/yello/auth.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#token ⇒ Object
Returns the value of attribute token.
Class Method Summary collapse
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key
5 6 7 |
# File 'lib/yello/auth.rb', line 5 def key @key end |
#token ⇒ Object
Returns the value of attribute token
5 6 7 |
# File 'lib/yello/auth.rb', line 5 def token @token end |
Class Method Details
.get ⇒ Object
9 10 11 |
# File 'lib/yello/auth.rb', line 9 def get Auth.new(*(netrc['yello'])) end |
.netrc ⇒ Object
20 21 22 |
# File 'lib/yello/auth.rb', line 20 def netrc Netrc.read end |
.set(key, token) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/yello/auth.rb', line 13 def set(key, token) netrc.tap do |n| n['yello'] = key, token n.save end end |