Module: Avm::With::ExtraSubcommands

Included in:
Instances::Base, Sources::Base
Defined in:
lib/avm/with/extra_subcommands.rb

Defined Under Namespace

Classes: RunnersFromModule

Instance Method Summary collapse

Instance Method Details

#extra_available_subcommandsHash<String, EacCli::Runner>

Returns:

  • (Hash<String, EacCli::Runner>)


10
11
12
# File 'lib/avm/with/extra_subcommands.rb', line 10

def extra_available_subcommands
  extra_available_subcommands_from_runners_module
end

#extra_available_subcommands_from_runners_moduleHash<String, EacCli::Runner>

Returns:

  • (Hash<String, EacCli::Runner>)


15
16
17
18
19
# File 'lib/avm/with/extra_subcommands.rb', line 15

def extra_available_subcommands_from_runners_module
  self.class.ancestors.reverse.inject({}) do |a, e|
    a.merge(RunnersFromModule.new(e).result)
  end
end