Class: Qubell::Organization

Inherits:
Base
  • Object
show all
Defined in:
lib/qubell/organization.rb

Overview

Implements Qubell organization interface

Instance Attribute Summary

Attributes inherited from Base

#id, #name

Instance Method Summary collapse

Methods inherited from Base

#==, #initialize, #to_hash, #to_json, #to_s

Constructor Details

This class inherits a constructor from Qubell::Base

Instance Method Details

#applicationsObject



13
14
15
16
17
18
# File 'lib/qubell/organization.rb', line 13

def applications
  Qubell::APICall.get("/organizations/#{@id}/applications").map do |app|
    app['organization_id'] = @id
    Qubell::Application.new(app)
  end
end

#environmentsObject



20
21
22
23
24
# File 'lib/qubell/organization.rb', line 20

def environments
  Qubell::APICall.get("/organizations/#{@id}/environments").map do |app|
    Qubell::Environment.new(app)
  end
end