Class: Dry::CLI::Completion::Command

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/dry/cli/completion/command.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.registryObject (readonly)

Returns the value of attribute registry.



37
38
39
# File 'lib/dry/cli/completion/command.rb', line 37

def registry
  @registry
end

Class Method Details

.[](registry) ⇒ Object



31
32
33
34
# File 'lib/dry/cli/completion/command.rb', line 31

def self.[](registry)
  @registry = registry
  self
end

Instance Method Details

#call(shell:, include_aliases: false) ⇒ Object



24
25
26
27
28
29
# File 'lib/dry/cli/completion/command.rb', line 24

def call(shell:, include_aliases: false, **)
  puts Generator.new(self.class.registry).call(
    shell: shell,
    include_aliases: include_aliases
  )
end