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.



35
36
37
# File 'lib/dry/cli/completion/command.rb', line 35

def registry
  @registry
end

Class Method Details

.[](registry) ⇒ Object



29
30
31
32
# File 'lib/dry/cli/completion/command.rb', line 29

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

Instance Method Details

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



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

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