Class: Awful::ApiGateway::Resources
- Defined in:
- lib/awful/api_gateway_resources.rb
Instance Method Summary collapse
Methods inherited from Cli
Constructor Details
This class inherits a constructor from Awful::Cli
Instance Method Details
#ls(id) ⇒ Object
[View source]
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/awful/api_gateway_resources.rb', line 13 def ls(id) api_gateway.get_resources(rest_api_id: id).items.output do |items| if [:long] print_table items.map { |i| methods = i.resource_methods ? i.resource_methods.keys.join(',') : '' [i.path, i.id, i.parent_id, methods] }.sort else puts items.map(&:path).sort end end end |