Class: A2::Subcommand::Team::Create
- Inherits:
-
CmdParse::Command
- Object
- CmdParse::Command
- A2::Subcommand::Team::Create
- Defined in:
- lib/a2/subcommands/team.rb
Instance Method Summary collapse
- #execute(id, name, project_ids = '') ⇒ Object
-
#initialize ⇒ Create
constructor
A new instance of Create.
Constructor Details
#initialize ⇒ Create
Returns a new instance of Create.
21 22 23 |
# File 'lib/a2/subcommands/team.rb', line 21 def initialize super('create-team', takes_commands: false) end |
Instance Method Details
#execute(id, name, project_ids = '') ⇒ Object
25 26 27 28 |
# File 'lib/a2/subcommands/team.rb', line 25 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).create_team(json)) end |