Symphony::

Metronome module

Constants

CONFIG_ENV

The name of the environment variable to check for config file overrides

DATADIR

The data directory that contains migration files.

DEFAULT_CONFIG_FILE

The path to the default config file

VERSION

Library version constant

Public Class Methods

config()

Get the loaded config (a Configurability::Config object)

# File lib/symphony/metronome.rb, line 39
def self::config
        Configurability.loaded_config
end
load_config( config_file=nil, defaults=nil )

Load the specified config_file, install the config in all objects with Configurability, and call any callbacks registered via after_configure.

# File lib/symphony/metronome.rb, line 46
def self::load_config( config_file=nil, defaults=nil )
        config_file ||= ENV[ CONFIG_ENV ] || DEFAULT_CONFIG_FILE
        defaults    ||= Configurability.gather_defaults
        config = Configurability::Config.load( config_file, defaults )
        config.install
end

Public Instance Methods

run( &block )

Convenience method for running the scheduler.

# File lib/symphony/metronome.rb, line 69
def run( &block )
        raise LocalJumpError, "No block provided." unless block_given?
        return Symphony::Metronome::Scheduler.run( &block )
end