Class: A2::Subcommand::Team::Update
- Inherits:
-
CmdParse::Command
- Object
- CmdParse::Command
- A2::Subcommand::Team::Update
- Defined in:
- lib/a2/subcommands/team.rb
Instance Method Summary collapse
- #execute(id, name, project_ids = '') ⇒ Object
-
#initialize ⇒ Update
constructor
A new instance of Update.
Constructor Details
#initialize ⇒ Update
Returns a new instance of Update.
40 41 42 |
# File 'lib/a2/subcommands/team.rb', line 40 def initialize super('update-team', takes_commands: false) end |
Instance Method Details
#execute(id, name, project_ids = '') ⇒ Object
44 45 46 47 |
# File 'lib/a2/subcommands/team.rb', line 44 def execute(id, name, project_ids = '') json = Team.generate_team_json(id, name, project_ids) puts JSON.pretty_generate(A2::Client.new(command_parser.data).update_team(id, json)) end |