Sha256: 22d472fb7b19bf835608f80552f8f54a53d9bacdd6c11553869e8537a091e2bf

Contents?: true

Size: 412 Bytes

Versions: 8

Compression:

Stored size: 412 Bytes

Contents

module Memo
  class File
    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

    def dir = "#{@namespace}"
    def file = "#{@file}.#{@config.ext}"
    def fullpath = "#{dir}/#{file}"
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ememo-0.2.1 lib/memo/value/file.rb
ememo-0.1.8 lib/memo/value/file.rb
ememo-0.1.7 lib/memo/value/file.rb
ememo-0.1.6 lib/memo/value/file.rb
ememo-0.1.5 lib/memo/value/file.rb
ememo-0.1.4 lib/memo/value/file.rb
ememo-0.1.3 lib/memo/value/file.rb
ememo-0.1.2 lib/memo/value/file.rb