Class: Spaceship::Portal::CloudContainer
- Inherits:
-
Spaceship::PortalBase
- Object
- Base
- Spaceship::PortalBase
- Spaceship::Portal::CloudContainer
- Defined in:
- spaceship/lib/spaceship/portal/cloud_container.rb
Overview
Represents an iCloud Container of the Apple Dev Portal
Instance Attribute Summary collapse
-
#can_delete ⇒ Bool
Is the container deletable?.
-
#can_edit ⇒ Bool
Is the container editable?.
-
#cloud_container ⇒ String
The identifier of this iCloud container, provided by the Dev Portal.
-
#identifier ⇒ String
The identifier assigned to this container.
-
#name ⇒ String
The name of this container.
-
#prefix ⇒ String
The prefix assigned to this container.
-
#status ⇒ String
Status of the container.
Attributes inherited from Base
Class Method Summary collapse
-
.all ⇒ Array
Returns all iCloud containers available for this account.
-
.create!(identifier: nil, name: nil) ⇒ CloudContainer
Creates a new iCloud Container on the Apple Dev Portal.
-
.find(identifier) ⇒ CloudContainer
Find a specific iCloud Container identifier.
Methods inherited from Spaceship::PortalBase
Methods inherited from Base
attr_accessor, attr_mapping, attributes, #attributes, factory, #initialize, #inspect, mapping_module, method_missing, set_client, #setup, #to_s
Constructor Details
This class inherits a constructor from Spaceship::Base
Instance Attribute Details
#can_delete ⇒ Bool
Returns Is the container deletable?.
36 37 38 |
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 36 def can_delete @can_delete end |
#can_edit ⇒ Bool
Returns Is the container editable?.
33 34 35 |
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 33 def can_edit @can_edit end |
#cloud_container ⇒ String
Returns The identifier of this iCloud container, provided by the Dev Portal.
30 31 32 |
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 30 def cloud_container @cloud_container end |
#identifier ⇒ String
Returns The identifier assigned to this container.
10 11 12 |
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 10 def identifier @identifier end |
#name ⇒ String
Returns The name of this container.
20 21 22 |
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 20 def name @name end |
#prefix ⇒ String
Returns The prefix assigned to this container.
15 16 17 |
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 15 def prefix @prefix end |
#status ⇒ String
Returns Status of the container.
25 26 27 |
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 25 def status @status end |
Class Method Details
.all ⇒ Array
Returns all iCloud containers available for this account
50 51 52 |
# 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) ⇒ CloudContainer
Creates a new iCloud Container on the Apple Dev Portal
59 60 61 62 |
# 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) ⇒ CloudContainer
Find a specific iCloud Container identifier
66 67 68 69 70 |
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 66 def find(identifier) all.find do |container| container.identifier == identifier end end |