Class: Arrow::Config::Loader

Inherits:
Arrow::Object show all
Includes:
PluginFactory
Defined in:
lib/arrow/config.rb

Overview

Abstract base class (and Factory) for configuration loader delegates. Create specific instances with the Arrow::Config::Loader.create method.

Direct Known Subclasses

YamlLoader

Class Method Summary

Instance Method Summary

Methods inherited from Arrow::Object

deprecate_class_method, deprecate_method, inherited

Methods included from Arrow::Loggable

#log

Class Method Details

+ (Object) derivativeDirs

Returns a list of directories to search for deriviatives.



560
561
562
# File 'lib/arrow/config.rb', line 560

def self::derivativeDirs
  ["arrow/config-loaders"]
end

Instance Method Details

- (Boolean) is_newer?(name, time)

Returns true if the configuration values in the storage medium associated with the given name has changed since the given time.

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


594
595
596
597
# File 'lib/arrow/config.rb', line 594

def is_newer?( name, time )
  raise NotImplementedError,
    "required method 'is_newer?' not implemented in '#{self.class.name}'"
end

- (Object) load(name)

Load configuration values from the storage medium associated with the given name (e.g., filename, rowid, etc.) and return them in the form of a (possibly multi-dimensional) Hash.

Raises:

  • (NotImplementedError)


576
577
578
579
# File 'lib/arrow/config.rb', line 576

def load( name )
  raise NotImplementedError,
    "required method 'load' not implemented in '#{self.class.name}'"
end

- (Object) save(confighash, name)

Save configuration values from the given confighash to the storage medium associated with the given name (e.g., filename, rowid, etc.) and return them.

Raises:

  • (NotImplementedError)


585
586
587
588
# File 'lib/arrow/config.rb', line 585

def save( confighash, name )
  raise NotImplementedError,
    "required method 'save' not implemented in '#{self.class.name}'"
end