Module: Vinegar::Authentication
- Included in:
- Client
- Defined in:
- lib/vinegar/authentication.rb
Instance Method Summary collapse
Instance Method Details
#authenticated? ⇒ Boolean
12 13 14 |
# File 'lib/vinegar/authentication.rb', line 12 def authenticated? !authentication.empty? end |
#authentication ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/vinegar/authentication.rb', line 4 def authentication if api_key { :api_key => api_key} else {} end end |
#login_token(api_key = "") ⇒ Object
16 17 18 19 |
# File 'lib/vinegar/authentication.rb', line 16 def login_token(api_key = "") return if api_key.nil? self.api_key = api_key end |