Class: Flexdot::Tasks
- Inherits:
-
Object
- Object
- Flexdot::Tasks
- Includes:
- Rake::DSL
- Defined in:
- lib/flexdot/tasks.rb
Defined Under Namespace
Classes: Index
Instance Method Summary collapse
-
#initialize(home_dir, options) ⇒ Tasks
constructor
A new instance of Tasks.
- #install ⇒ Object
Constructor Details
#initialize(home_dir, options) ⇒ Tasks
Returns a new instance of Tasks.
13 14 15 16 17 |
# File 'lib/flexdot/tasks.rb', line 13 def initialize(home_dir, ) @home_dir = Pathname.new(home_dir). @dotfiles_dir = Pathname.new(.dotfiles_dir). @options = end |
Instance Method Details
#install ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/flexdot/tasks.rb', line 19 def install desc 'Clear backups' task :clear_backups do Backup.clear_all end namespace :install do indexes.each do |index| desc "Install dotfiles for #{index.name}" task index.name do installer = Installer.new( index.name, home_dir, dotfiles_dir, ) installer.install(index.filename) end end end end |