Class: ActiveCabinet::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/active_cabinet/config.rb

Overview

Configure the global behavior of ActiveCabinet.

Examples:

# Change the directory where cabinets are stored
ActiveCabinet::Config.dir = "cabinets"

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Attribute Details

.dirString

Returns the base directory for all cabinet files.

Returns:

  • (String)

    the base directory for all cabinet files.



16
17
18
# File 'lib/active_cabinet/config.rb', line 16

def dir
  @dir ||= 'db'
end

Instance Attribute Details

#dir=(value) ⇒ String (writeonly)

Sets the base directory for all cabinet files (default ‘db’).

Parameters:

  • value (String)

    the value to set the attribute dir to.

Returns:

  • (String)

    the newly set value



9
10
11
# File 'lib/active_cabinet/config.rb', line 9

def dir=(value)
  @dir = value
end