Class: Homey::Tasks
- Inherits:
-
Thor
- Object
- Thor
- Homey::Tasks
- Defined in:
- lib/homey/tasks.rb
Instance Method Summary collapse
Instance Method Details
#create_symlinks ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/homey/tasks.rb', line 6 def create_symlinks opts = { flavor: [:flavor], flavorized_attributes: %w(target) } symlinks = Flavorizer::flavorize_group(home_file["sym_links"], opts) symlinks.each do |sym| paths = replace_home_char(sym['target'], sym['link']) target, link = absolutize_paths(*paths) FileUtils.rm_rf(link) if [:force] File.symlink target, link end end |
#setup ⇒ Object
18 19 20 |
# File 'lib/homey/tasks.rb', line 18 def setup home_file["commands"].each { |command| system command } end |