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
- #logical_database ⇒ Object
- #logical_database=(v) ⇒ Object
- #opts ⇒ Object
-
#prefix ⇒ String
Retrieves the prefix for the current instance by delegating to its class.
Instance Attribute Details
#dump_method ⇒ Object
42 43 44 |
# File 'lib/familia/horreum/shared/settings.rb', line 42 def dump_method @dump_method || self.class.dump_method end |
#load_method ⇒ Object
46 47 48 |
# File 'lib/familia/horreum/shared/settings.rb', line 46 def load_method @load_method || self.class.load_method end |
#suffix ⇒ Object
38 39 40 |
# File 'lib/familia/horreum/shared/settings.rb', line 38 def suffix @suffix || self.class.suffix end |
Instance Method Details
#logical_database ⇒ Object
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 |
#opts ⇒ Object
16 17 18 19 |
# File 'lib/familia/horreum/shared/settings.rb', line 16 def opts @opts ||= {} @opts end |
#prefix ⇒ String
Retrieves the prefix for the current instance by delegating to its class.
34 35 36 |
# File 'lib/familia/horreum/shared/settings.rb', line 34 def prefix self.class.prefix end |