Class: Ambient::CapabilitiesHelper
- Inherits:
-
Object
- Object
- Ambient::CapabilitiesHelper
- Defined in:
- lib/ambient/capabilities_helper.rb
Constant Summary collapse
- CAPABILITIES =
{ application_group_ios: "ApplicationGroups.iOS", background_modes: "BackgroundModes", data_protection: "DataProtection", game_center: "GameCenter", healthkit: "HealthKit", health_kit: "HealthKit", homekit: "HomeKit", home_kit: "HomeKit", in_app_purchase: "InAppPurchase", inter_app_audio: "InterAppAudio", keychain: "Keychain", maps: "Maps.iOS", apple_pay: "OMC", passbook: "Passbook", wallet: "Passbook", safari_keychain: "SafariKeychain", personal_vpn: "VPNLite", wireless_accessory_configuration: "WAC", icloud: "iCloud" }
Instance Method Summary collapse
- #clear_capabilities ⇒ Object
- #disable_capability(capability) ⇒ Object
- #enable_capability(capability) ⇒ Object
-
#initialize(project, target) ⇒ CapabilitiesHelper
constructor
A new instance of CapabilitiesHelper.
- #set_development_team(team) ⇒ Object
Constructor Details
#initialize(project, target) ⇒ CapabilitiesHelper
Returns a new instance of CapabilitiesHelper.
25 26 27 28 |
# File 'lib/ambient/capabilities_helper.rb', line 25 def initialize(project, target) @project = project @target = target end |
Instance Method Details
#clear_capabilities ⇒ Object
30 31 32 |
# File 'lib/ambient/capabilities_helper.rb', line 30 def clear_capabilities capabilities.delete_if { |_, _| true } if capabilities end |
#disable_capability(capability) ⇒ Object
38 39 40 |
# File 'lib/ambient/capabilities_helper.rb', line 38 def disable_capability(capability) capabilities.delete(capability_key(capability)) end |
#enable_capability(capability) ⇒ Object
34 35 36 |
# File 'lib/ambient/capabilities_helper.rb', line 34 def enable_capability(capability) capabilities[capability_key(capability)] = {"enabled"=>"1"} end |
#set_development_team(team) ⇒ Object
42 43 44 |
# File 'lib/ambient/capabilities_helper.rb', line 42 def set_development_team(team) target_attributes["DevelopmentTeam"] = team end |