Class: Cabalist::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/cabalist/configuration.rb

Overview

Cabalist settings.

This class is a singleton storing some configuration data of the Cabalist library as used by the application.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCabalist::Configuration

Initializer of the Cabalist::Configuration object



24
25
26
# File 'lib/cabalist/configuration.rb', line 24

def initialize
  self.frontend_classes = []
end

Instance Attribute Details

#db_pathString

Path to the local LevelDB instance

Returns:

  • (String)

    path to the local LevelDB instance



16
17
18
# File 'lib/cabalist/configuration.rb', line 16

def db_path
  @db_path
end

#frontend_classesArray

Cabalist-enabled classes that should be exposed via web GUI

Returns:

  • (Array)

    classes that should be exposed via web GUI



20
21
22
# File 'lib/cabalist/configuration.rb', line 20

def frontend_classes
  @frontend_classes
end

Instance Method Details

#databaseLevelDB::DB

Get the local instance of LevelDB used for caching.

Returns:

  • (LevelDB::DB)

    instance of LevelDB used by the application



31
32
33
# File 'lib/cabalist/configuration.rb', line 31

def database
  LevelDB::DB::new(db_path)
end