Method: Memo::File#initialize

Defined in:
lib/memo/value/file.rb

#initialize(file = nil, namespace = nil, config: Memo::Config.new) ⇒ File

Returns a new instance of File.



3
4
5
6
7
8
9
10
11
12
# File 'lib/memo/value/file.rb', line 3

def initialize(
  file = nil,
  namespace = nil,
  config: Memo::Config.new
)
  @config = config
  @file = file || @config.default_filename
  @namespace = Alias::Namespace.new(namespace).call ||
    @config.default_namespace
end