class Openlab::Projects

Constants

PROJECTS_PATH

Attributes

client[RW]

Public Class Methods

new(client = nil) click to toggle source
# File lib/openlab/projects.rb, line 7
def initialize(client = nil)
  @client = client || Openlab::Client.new
end

Public Instance Methods

create(attributes) click to toggle source
# File lib/openlab/projects.rb, line 15
def create(attributes)
  client.post(path, body: { project: attributes })
end
destroy(id) click to toggle source
# File lib/openlab/projects.rb, line 23
def destroy(id)
  client.delete("#{path}/#{id}")
end
update(id, attributes) click to toggle source
# File lib/openlab/projects.rb, line 19
def update(id, attributes)
  client.patch("#{path}/#{id}", body: { project: attributes })
end

Private Instance Methods

path() click to toggle source
# File lib/openlab/projects.rb, line 28
def path
  "#{Openlab.config.api_version_path}#{PROJECTS_PATH}"
end