Class: A2::Subcommand::Team::GetTeamsByMembership
- Inherits:
-
CmdParse::Command
- Object
- CmdParse::Command
- A2::Subcommand::Team::GetTeamsByMembership
- Defined in:
- lib/a2/subcommands/team.rb
Instance Method Summary collapse
- #execute(membership_id) ⇒ Object
-
#initialize ⇒ GetTeamsByMembership
constructor
A new instance of GetTeamsByMembership.
Constructor Details
#initialize ⇒ GetTeamsByMembership
Returns a new instance of GetTeamsByMembership.
81 82 83 |
# File 'lib/a2/subcommands/team.rb', line 81 def initialize super('get-teams-by-membership', takes_commands: false) end |
Instance Method Details
#execute(membership_id) ⇒ Object
85 86 87 |
# File 'lib/a2/subcommands/team.rb', line 85 def execute(membership_id) puts JSON.pretty_generate(A2::Client.new(command_parser.data).get_teams_by_membership(membership_id)) end |