Class: BundleHack::GemfileWriter

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

Constant Summary collapse

FILTERED_PARAMS =
%i[git path].freeze

Instance Method Summary collapse

Constructor Details

#initialize(root_path, gemfile_path, gems) ⇒ GemfileWriter

Returns a new instance of GemfileWriter.



7
8
9
10
11
12
# File 'lib/bundle_hack/gemfile_writer.rb', line 7

def initialize(root_path, gemfile_path, gems)
  @root_path = root_path
  @gemfile_path = gemfile_path
  @hacked_gems = gems
  @hacked_gemfile_path = @root_path.join(GEMFILE)
end

Instance Method Details

#createObject



14
15
16
17
# File 'lib/bundle_hack/gemfile_writer.rb', line 14

def create
  comment_existing_gems
  append_hacked_gems
end