lib/iron/settings/static_store.rb
# Loads a single settings file, verifying its existence, ownership/security, etc.
Loads a single settings file, verifying its existence, ownership/security, etc.
Loads a single settings file verifying its existence ownership / security etc .
def load_file(path)
      raise RuntimeError.new("Missing settings file #{path} - this file is required") unless @ignore_missing || File.exists?(path)
      verify_file_security(path)
      text = File.read(path) rescue ''
      return if text.blank?
      cursor = Settings::Cursor.new(@root, self)
      cursor.eval_in_context(text)
      @modified_time[path] = File.mtime(path)
    end
def load_file ( path ) raise RuntimeError . new ( "Missing settings file #{path} - this file is required" ) unless @ignore_missing || File . exists? ( path ) verify_file_security ( path ) text = File . read ( path ) rescue '' return if text . blank? cursor = Settings :: Cursor . new ( @root , self ) cursor . eval_in_context ( text ) @modified_time [ path ] = File . mtime ( path ) end
Loads a single settings file, verifying its existence, ownership/security, etc.
Loads a single settings file verifying its existence ownership / security etc .
# Ensure we have the file, if so required # Read in the settings file # Create a cursor, and eval the file's contents in the cursor's context # Remember our modified time for future checking
path
<not_specific>