class Moltrio::Config::SingleFileAdapter

Attributes

must_exist[R]

Public Class Methods

new(config, path, must_exist: false) click to toggle source
# File lib/moltrio/config/adapters/single_file_adapter.rb, line 13
def initialize(config, path, must_exist: false)
  @path = path

  if must_exist && !Pathname(path).file?
    raise "File '#{path}' doesn't exist!"
  end
end

Public Instance Methods

missing_namespace?() click to toggle source
# File lib/moltrio/config/adapters/single_file_adapter.rb, line 21
def missing_namespace?
  false
end

Private Instance Methods

storage() click to toggle source
# File lib/moltrio/config/adapters/single_file_adapter.rb, line 27
def storage
  @storage ||= FileStorage.new(@path)
end