Module: Familia::Horreum::Settings

Included in:
Familia::Horreum
Defined in:
lib/familia/horreum/shared/settings.rb

Overview

Settings - Instance-level configuration methods for Horreum models Provides per-instance settings like logical_database, dump_method, load_method, suffix

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dump_methodObject



42
43
44
# File 'lib/familia/horreum/shared/settings.rb', line 42

def dump_method
  @dump_method || self.class.dump_method
end

#load_methodObject



46
47
48
# File 'lib/familia/horreum/shared/settings.rb', line 46

def load_method
  @load_method || self.class.load_method
end

#suffixObject



38
39
40
# File 'lib/familia/horreum/shared/settings.rb', line 38

def suffix
  @suffix || self.class.suffix
end

Instance Method Details

#logical_databaseObject



25
26
27
# File 'lib/familia/horreum/shared/settings.rb', line 25

def logical_database
  @logical_database || self.class.logical_database
end

#logical_database=(v) ⇒ Object



21
22
23
# File 'lib/familia/horreum/shared/settings.rb', line 21

def logical_database=(v)
  @logical_database = v.to_i
end

#optsObject



16
17
18
19
# File 'lib/familia/horreum/shared/settings.rb', line 16

def opts
  @opts ||= {}
  @opts
end

#prefixString

Retrieves the prefix for the current instance by delegating to its class.

Examples:

instance.prefix

Returns:

  • (String)

    The prefix associated with the class of the current instance.



34
35
36
# File 'lib/familia/horreum/shared/settings.rb', line 34

def prefix
  self.class.prefix
end