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



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

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

#write(content:, path:) ⇒ Object



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

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