Class: DeployGate::Xcode::MemberCenters::App

Inherits:
Object
  • Object
show all
Defined in:
lib/deploygate/xcode/member_centers/app.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uuid, member_center) ⇒ DeployGate::Xcode::MemberCenters::App

Parameters:



10
11
12
13
# File 'lib/deploygate/xcode/member_centers/app.rb', line 10

def initialize(uuid, member_center)
  @member_center = member_center
  @uuid = uuid
end

Instance Attribute Details

#member_centerObject (readonly)

Returns the value of attribute member_center.



5
6
7
# File 'lib/deploygate/xcode/member_centers/app.rb', line 5

def member_center
  @member_center
end

#uuidObject (readonly)

Returns the value of attribute uuid.



5
6
7
# File 'lib/deploygate/xcode/member_centers/app.rb', line 5

def uuid
  @uuid
end

Instance Method Details

#create!void

This method returns an undefined value.



25
26
27
# File 'lib/deploygate/xcode/member_centers/app.rb', line 25

def create!
  @member_center.launcher.app.create!(bundle_id: @uuid, name: name())
end

#created?Boolean

Returns:

  • (Boolean)


16
17
18
19
20
21
22
# File 'lib/deploygate/xcode/member_centers/app.rb', line 16

def created?
  @member_center.launcher.app.all.collect do |app|
    return true if app.bundle_id == @uuid
  end

  false
end

#nameString

Returns:

  • (String)


30
31
32
# File 'lib/deploygate/xcode/member_centers/app.rb', line 30

def name
  @uuid.split('.').join(' ')
end