Class: Synchronisable::Configuration
- Includes:
- ActiveSupport::Configurable
- Defined in:
- lib/synchronisable/configuration.rb
Class Method Summary collapse
- .config_accessor(*names) ⇒ Object
-
.old_config_accessor ⇒ Object
HACK: This is required to smooth a future transition to activesupport 4.x Since 3-2’s config_accessor doesn’t take a block or provide an option to set the default value of a config.
Class Method Details
.config_accessor(*names) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/synchronisable/configuration.rb', line 10 def config_accessor(*names) old_config_accessor(*names) return unless block_given? names.each do |name| send("#{name}=", yield) end end |
.old_config_accessor ⇒ Object
HACK: This is required to smooth a future transition to activesupport 4.x Since 3-2’s config_accessor doesn’t take a block or provide an option to set the default value of a config.
8 |
# File 'lib/synchronisable/configuration.rb', line 8 alias_method :old_config_accessor, :config_accessor |