Method: Etna::Command#completions

Defined in:
lib/etna/command.rb

#completionsObject



246
247
248
249
250
251
252
253
254
255
# File 'lib/etna/command.rb', line 246

def completions
  method(:execute).parameters.map do |type, name|
    name = "..." if name.nil?
    if type == :req || type == :opt
      [completions_for(name)]
    else
      []
    end
  end.inject([], &:+)
end