Module: Sinclair::Settable::ClassMethods
- Included in:
- ChainSettable, EnvSettable, Sinclair::Settable
- Defined in:
- lib/sinclair/settable/class_methods.rb
Overview
Class methods availabe inside a Settable module
The methods should help configuring the settable
Instance Method Summary collapse
-
#read_with(&read_block) ⇒ Proc
Register and return a block for reading a setting.
Instance Method Details
#read_with(&read_block) ⇒ Proc
Register and return a block for reading a setting
When the block is called, it will receive the key and any given options
58 59 60 61 62 63 |
# File 'lib/sinclair/settable/class_methods.rb', line 58 def read_with(&read_block) return @read_block = read_block if read_block return @read_block if @read_block superclass_settable&.read_with end |