Class: XFTP::Configuration

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

Overview

Provides a way to store and retrive configuration options

Class Method Summary collapse

Class Method Details

.config_accessor(*names) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/configuration.rb', line 16

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.



14
# File 'lib/configuration.rb', line 14

alias_method :old_config_accessor, :config_accessor