Module: Familia::Horreum::Settings
- Included in:
- Familia::Horreum
- Defined in:
- lib/familia/horreum/settings.rb
Overview
Settings - Instance-level configuration methods for Horreum models Provides per-instance settings like logical_database, 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
#suffix ⇒ Object
40 41 42 |
# File 'lib/familia/horreum/settings.rb', line 40 def suffix @suffix || self.class.suffix end |
Instance Method Details
#logical_database ⇒ Object
27 28 29 |
# File 'lib/familia/horreum/settings.rb', line 27 def logical_database @logical_database || self.class.logical_database end |
#logical_database=(v) ⇒ Object
23 24 25 |
# File 'lib/familia/horreum/settings.rb', line 23 def logical_database=(v) @logical_database = v.to_i end |
#opts ⇒ Object
18 19 20 21 |
# File 'lib/familia/horreum/settings.rb', line 18 def opts @opts ||= {} @opts end |
#prefix ⇒ String
Retrieves the prefix for the current instance by delegating to its class.
36 37 38 |
# File 'lib/familia/horreum/settings.rb', line 36 def prefix self.class.prefix end |