Method: Mu::Command::Cmd_muapi#cmd_list

Defined in:
lib/mu/command/cmd_muapi.rb

#cmd_list(argv) ⇒ Object

lists all templates of the given type

* argv = command-line arguments, requires a type (-t) argument, such as 'scenario'


161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/mu/command/cmd_muapi.rb', line 161

def cmd_list argv
  setup argv
  type = @hash['type']
  response = @api.list(type)
  if response.is_a?(Array)
    response.each do | r |
      msg r
    end
  else
    msg response
  end
  return response
end