Class: Scalingo::Endpoint::AccountKeys
- Inherits:
-
Collection
- Object
- Collection
- Scalingo::Endpoint::AccountKeys
- Defined in:
- lib/scalingo/endpoint/account_keys.rb
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
- #collection_name ⇒ Object
- #create(name, content) ⇒ Object
-
#initialize(api, _, opts = {}) ⇒ AccountKeys
constructor
A new instance of AccountKeys.
Methods inherited from Collection
#all, #each, #find, #find_by, #resource_class
Methods included from Scalingo::Endpoint
Methods included from ClassMethods
Constructor Details
#initialize(api, _, opts = {}) ⇒ AccountKeys
Returns a new instance of AccountKeys.
4 5 6 |
# File 'lib/scalingo/endpoint/account_keys.rb', line 4 def initialize(api, _, opts = {}) super(api, 'keys', opts) end |
Instance Method Details
#collection_name ⇒ Object
8 9 10 |
# File 'lib/scalingo/endpoint/account_keys.rb', line 8 def collection_name 'keys' end |
#create(name, content) ⇒ Object
12 13 14 |
# File 'lib/scalingo/endpoint/account_keys.rb', line 12 def create(name, content) post(nil, key: { name: name, content: content }) end |