class Team
Attributes
teamlist[RW]
Public Class Methods
shell_prompt(config)
click to toggle source
# File lib/actions/teams.rb, line 9 def self.shell_prompt(config) if config['Repo'].nil? Rainbow("#{config['User']}> ").aqua << Rainbow("#{config['Org']}> ").magenta << Rainbow("#{config['Team']}> ").color('#eeff41') else Rainbow("#{config['User']}> ").aqua + Rainbow("#{config['Org']}> ").magenta << Rainbow("#{config['Team']}> ").color('#eeff41') << Rainbow("#{config['Repo']}> ").color(236, 151, 21) end end
Public Instance Methods
build_cd_syntax(type, name)
click to toggle source
# File lib/actions/teams.rb, line 17 def build_cd_syntax(type, name) syntax_map = { 'repo' => "Team.new.cd('repo', #{name}, client, env)" } unless syntax_map.key?(type) raise Rainbow("cd #{type} currently not supported.").color('#cc0000') end syntax_map[type] end
open_info(config, params = nil, client = nil)
click to toggle source
# File lib/actions/teams.rb, line 25 def open_info(config, params = nil, client = nil) if config['Repo'].nil? open_url(config['team_url'].to_s) else open_url(config['repo_url'].to_s) end end