class DeployGate::Xcode::LocalTeams
Public Class Methods
new()
click to toggle source
# File lib/deploygate/xcode/local_teams.rb, line 5 def initialize @team_ids = [] @team_names = [] @team_profile_paths = {} end
Public Instance Methods
add(id, name, profile_path)
click to toggle source
@param [String] id @param [String] name @param [String] profile_path @return [void]
# File lib/deploygate/xcode/local_teams.rb, line 15 def add(id, name, profile_path) unless @team_ids.include?(id) @team_ids.push(id) @team_names.push(name) @team_profile_paths[id] = [] end @team_profile_paths[id].push(profile_path) unless @team_profile_paths.include?(profile_path) end
first_team_profile_paths()
click to toggle source
@return [Array<String>]
# File lib/deploygate/xcode/local_teams.rb, line 32 def first_team_profile_paths return [] if @team_ids.empty? profile_paths(@team_ids.first) end
profile_paths(id)
click to toggle source
@param [String] id @return [Array<String>]
# File lib/deploygate/xcode/local_teams.rb, line 53 def profile_paths(id) return [] unless @team_ids.include?(id) @team_profile_paths[id] end
teams()
click to toggle source
@return [Array<Hash>]
[
{id: xxxx, name: xxxxx}, {id: xxxx, name: xxxxx}
]
# File lib/deploygate/xcode/local_teams.rb, line 44 def teams teams = [] @team_ids.each_with_index{|id, index| teams.push({id: id, name: @team_names[index]})} teams end
teams_count()
click to toggle source
@return [Fixnum]
# File lib/deploygate/xcode/local_teams.rb, line 27 def teams_count @team_ids.count end