Class: Scalingo::Endpoint::Variables

Inherits:
Collection show all
Defined in:
lib/scalingo/endpoint/variables.rb

Instance Attribute Summary

Attributes included from Base

#api, #auth_api, #prefix

Instance Method Summary collapse

Methods inherited from Collection

#collection_name, #each, #find, #find_by, #resource_class

Methods included from Scalingo::Endpoint

included

Methods included from ClassMethods

#resources

Methods included from Base

#initialize

Instance Method Details

#all(aliases = true) ⇒ Object



4
5
6
# File 'lib/scalingo/endpoint/variables.rb', line 4

def all(aliases = true)
  get(nil, aliases: aliases)[collection_name]
end

#create(name, value) ⇒ Object



8
9
10
# File 'lib/scalingo/endpoint/variables.rb', line 8

def create(name, value)
  post(nil, variable: { name: name, value: value })
end