Class: RubySkills::Adapters::Base Abstract
- Inherits:
-
Object
- Object
- RubySkills::Adapters::Base
- Defined in:
- lib/ruby_skills/adapters/base.rb
Overview
This class is abstract.
Base implementation for skill adapters.
Subclasses must define an ADAPTER_INFO constant containing:
- :adapter — tool directory under the project root
- :directory — directory containing skills
Instance Method Summary collapse
-
#initialize(root: Dir.pwd) ⇒ Base
constructor
A new instance of Base.
-
#install(name, source) ⇒ void
Install a skill into the adapter destination.
-
#remove(name) ⇒ void
Remove an installed skill.
Constructor Details
Instance Method Details
#install(name, source) ⇒ void
This method returns an undefined value.
Install a skill into the adapter destination.
25 26 27 |
# File 'lib/ruby_skills/adapters/base.rb', line 25 def install(name, source) link(source, destination_for(name)) end |
#remove(name) ⇒ void
This method returns an undefined value.
Remove an installed skill.
33 34 35 |
# File 'lib/ruby_skills/adapters/base.rb', line 33 def remove(name) FileUtils.rm_rf(destination_for(name)) end |