Class: A2::Subcommand::Infra::ListNodeRuns
Instance Attribute Summary
Attributes inherited from Filtered
Instance Method Summary collapse
- #execute(node_id) ⇒ Object
-
#initialize ⇒ ListNodeRuns
constructor
A new instance of ListNodeRuns.
Methods inherited from Paginated
#generate_paginated_query_string, #with_paginated_filter_json, #with_paginated_filter_query
Methods inherited from Filtered
#generate_json_filters, #generate_query_filters, #parse_filters, #set_custom_opts!, #set_filter_optparse_options!, #with_filter_query
Constructor Details
#initialize ⇒ ListNodeRuns
Returns a new instance of ListNodeRuns.
29 30 31 |
# File 'lib/a2/subcommands/infra.rb', line 29 def initialize super('list-node-runs', takes_commands: false, query_filter: true, disable_sort_opts: true) end |
Instance Method Details
#execute(node_id) ⇒ Object
33 34 35 36 37 |
# File 'lib/a2/subcommands/infra.rb', line 33 def execute(node_id) with_paginated_filter_query do |query_string| puts JSON.pretty_generate(A2::Client.new(command_parser.data).list_all_node_runs(node_id, query_string)) end end |