Sha256: e46413853f81c840c2a12cdaf9841bd264312f6b81d1c3178884edcd16f0bcdb
Contents?: true
Size: 861 Bytes
Versions: 6
Compression:
Stored size: 861 Bytes
Contents
require 'engineyard-cloud-client/models/api_struct' module EY class CloudClient class Account < ApiStruct.new(:id, :name) def self.all(api) self.from_array(api, api.request('/accounts')["accounts"]) end def add_app(app) @apps ||= [] existing_app = @apps.detect { |a| app.id == a.id } unless existing_app @apps << app end existing_app || app end def apps @apps ||= [] end def add_environment(environment) @environments ||= [] existing_environment = @environments.detect { |env| environment.id == env.id } unless existing_environment @environments << environment end existing_environment || environment end def environments @environments ||= [] end end end end
Version data entries
6 entries across 6 versions & 1 rubygems