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) ⇒ DeployGate::Xcode::MemberCenters::App

Parameters:

  • uuid (String)


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

def initialize(uuid)
  @member_center = DeployGate::Xcode::MemberCenter.instance
  @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.



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

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

#created?Boolean

Returns:

  • (Boolean)


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

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

  false
end

#nameString

Returns:

  • (String)


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

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