Class: Muxify::Linker

Inherits:
Object
  • Object
show all
Defined in:
lib/muxify/linker.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root:) ⇒ Linker

Returns a new instance of Linker.



14
15
16
# File 'lib/muxify/linker.rb', line 14

def initialize(root:)
  @root = File.expand_path(root)
end

Class Method Details

.call(**args) ⇒ Object



10
11
12
# File 'lib/muxify/linker.rb', line 10

def self.call(**args)
  new(**args).call
end

Instance Method Details

#callObject



18
19
20
21
# File 'lib/muxify/linker.rb', line 18

def call
  FileUtils.mkdir_p(TMUXINATOR_CONFIG_PATH)
  File.open(config_path, 'w') { |f| f << contents }
end