Class: Dry::Files::Adapter Private

Inherits:
Object
  • Object
show all
Defined in:
lib/dry/files/adapter.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Class Method Summary collapse

Class Method Details

.call(memory:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



10
11
12
13
14
15
16
17
18
# File 'lib/dry/files/adapter.rb', line 10

def self.call(memory:)
  if memory
    require_relative "./memory_file_system"
    MemoryFileSystem.new
  else
    require_relative "./file_system"
    FileSystem.new
  end
end