class Spaceship::Portal::CloudContainer

Represents an iCloud Container of the Apple Dev Portal

Attributes

can_delete[RW]

@return (Bool) Is the container deletable?

can_edit[RW]

@return (Bool) Is the container editable?

cloud_container[RW]

@return (String) The identifier of this iCloud container, provided by the Dev Portal @example

"2MAY7NPHAA"
identifier[RW]

@return (String) The identifier assigned to this container @example

"iCloud.com.example.application"
name[RW]

@return (String) The name of this container @example

"iCloud com example application"
prefix[RW]

@return (String) The prefix assigned to this container @example

"9J57U9392R"
status[RW]

@return (String) Status of the container @example

"current"

Public Class Methods

all() click to toggle source

@return (Array) Returns all iCloud containers available for this account

# File spaceship/lib/spaceship/portal/cloud_container.rb, line 50
def all
  client.cloud_containers.map { |container| self.factory(container) }
end
create!(identifier: nil, name: nil) click to toggle source

Creates a new iCloud Container on the Apple Dev Portal

@param identifier [String] the identifier to assign to this container @param name [String] the name of the container @return (CloudContainer) The container you just created

# File spaceship/lib/spaceship/portal/cloud_container.rb, line 59
def create!(identifier: nil, name: nil)
  new_container = client.create_cloud_container!(name, identifier)
  self.new(new_container)
end
find(identifier) click to toggle source

Find a specific iCloud Container identifier @return (CloudContainer) The iCloud Container you're looking for. This is nil if the container can't be found.

# File spaceship/lib/spaceship/portal/cloud_container.rb, line 66
def find(identifier)
  all.find do |container|
    container.identifier == identifier
  end
end