Class: Arrow::Config::Loader

Inherits:
Object
  • 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 collapse

Instance Method Summary collapse

Methods inherited from Object

deprecate_class_method, deprecate_method, inherited

Class Method Details

.derivativeDirsObject

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

#is_newer?(name, time) ⇒ Boolean

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

#load(name) ⇒ Object

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

#save(confighash, name) ⇒ Object

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