Class: A2::Subcommand::Team::Delete

Inherits:
CmdParse::Command
  • Object
show all
Includes:
Approved
Defined in:
lib/a2/subcommands/team.rb

Instance Method Summary collapse

Methods included from Approved

#ask_for_approval, #with_approval

Constructor Details

#initializeDelete

Returns a new instance of Delete.



51
52
53
# File 'lib/a2/subcommands/team.rb', line 51

def initialize
  super('delete-team', takes_commands: false)
end

Instance Method Details

#execute(id) ⇒ Object



55
56
57
58
59
# File 'lib/a2/subcommands/team.rb', line 55

def execute(id)
  with_approval("delete team #{id}") do
    puts JSON.pretty_generate(A2::Client.new(command_parser.data).delete_team(id))
  end
end