Class: AdLocalize::Repositories::FileSystemRepository

Inherits:
Object
  • Object
show all
Defined in:
lib/ad_localize/repositories/file_system_repository.rb

Instance Method Summary collapse

Instance Method Details

#create_directory(path:) ⇒ Object



4
5
6
# File 'lib/ad_localize/repositories/file_system_repository.rb', line 4

def create_directory(path:)
  path.mkpath unless path.directory?
end

#write(content:, path:) ⇒ Object



8
9
10
# File 'lib/ad_localize/repositories/file_system_repository.rb', line 8

def write(content:, path:)
  path.open("w") { |file| file.write content }
end