Class: Agent::Lock::CLI::Commands::SkillsInstall

Inherits:
Base
  • Object
show all
Defined in:
lib/agent/lock/cli/commands/skills.rb

Overview

alock skills install: copy the bundled skill into a skills directory, so an agent learns how to claim files before it first needs to.

Instance Attribute Summary

Attributes inherited from Base

#launcher

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Agent::Lock::CLI::Commands::Base

Instance Method Details

#call(**options) ⇒ Skill::Result

Parameters:

  • options (Hash) —

    :into, :for, :overwrite

Returns:



45
46
47
48
49
50
51
52
# File 'lib/agent/lock/cli/commands/skills.rb', line 45

def call(**options)
  into = destination_for(options)
  skill = into ? Skill.new(into: into) : Skill.new

  result = skill.install(overwrite: options[:overwrite])
  report(result)
  finish(result)
end