Class: BundleHack::ConfigWriter
- Inherits:
-
Object
- Object
- BundleHack::ConfigWriter
- Defined in:
- lib/bundle_hack/config_writer.rb
Instance Method Summary collapse
- #create_or_update ⇒ Object
-
#initialize(root_path) ⇒ ConfigWriter
constructor
A new instance of ConfigWriter.
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_update ⇒ Object
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 |