Class: Synchronisable::Configuration

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Configurable
Defined in:
lib/synchronisable/configuration.rb

Class Method Summary collapse

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_accessorObject

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