Class: Rambo::RSpec::HelperFile

Inherits:
Object
  • Object
show all
Defined in:
lib/rambo/rspec/helper_file.rb

Instance Method Summary collapse

Constructor Details

#initialize(template_path:, file_path:) ⇒ HelperFile

Returns a new instance of HelperFile.



4
5
6
7
# File 'lib/rambo/rspec/helper_file.rb', line 4

def initialize(template_path:, file_path:)
  @template_path = template_path
  @file_path     = file_path
end

Instance Method Details

#generateObject



9
10
11
# File 'lib/rambo/rspec/helper_file.rb', line 9

def generate
  write_to_file(template) unless file_already_exists?
end