Class: BundleHack::ConfigWriter

Inherits:
Object
  • Object
show all
Defined in:
lib/bundle_hack/config_writer.rb

Instance Method Summary collapse

Constructor Details

#initialize(root_path) ⇒ ConfigWriter

Returns a new instance of ConfigWriter.



5
6
7
8
# File 'lib/bundle_hack/config_writer.rb', line 5

def initialize(root_path)
  @root_path = root_path
  @config_path = File.join(@root_path, '.bundle', 'config')
end

Instance Method Details

#create_or_updateObject



10
11
12
13
14
# File 'lib/bundle_hack/config_writer.rb', line 10

def create_or_update
  return create_config unless File.exist?(@config_path)

  update_config
end