Module: ESM::Command::Territory::ServerTerritories::V1
- Defined in:
- lib/esm/command/territory/server_territories.rb
Instance Method Summary collapse
Instance Method Details
#on_execute ⇒ Object
50 51 52 53 |
# File 'lib/esm/command/territory/server_territories.rb', line 50 def on_execute check_for_owned_server! deliver!(command_name: "allterritories", query: "list_territories_all") end |
#on_response ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/esm/command/territory/server_territories.rb', line 55 def on_response # The data must an array if its not already. @territories = if @response.is_a?(Array) @response else [@response] end check_for_no_territories! tables = build_territory_tables tables.each { |table| reply("```\n#{table}\n```") } end |