Sha256: faf631869521e7da559339f9ba9219d5982c57490fb21f91bef4f61f9472c6c4

Contents?: true

Size: 256 Bytes

Versions: 19

Compression:

Stored size: 256 Bytes

Contents

module Percheron
  module ConfigDelegator
    def def_config_item_with_default(config, default, *symbols)
      symbols.each do |symbol|
        define_method(symbol) do
          send(config).fetch(symbol, default)
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
percheron-0.8.1 lib/percheron/config_delegator.rb
percheron-0.8.0 lib/percheron/config_delegator.rb
percheron-0.7.16 lib/percheron/config_delegator.rb
percheron-0.7.15 lib/percheron/config_delegator.rb
percheron-0.7.14 lib/percheron/config_delegator.rb
percheron-0.7.13 lib/percheron/config_delegator.rb
percheron-0.7.12 lib/percheron/config_delegator.rb
percheron-0.7.11 lib/percheron/config_delegator.rb
percheron-0.7.10 lib/percheron/config_delegator.rb
percheron-0.7.9 lib/percheron/config_delegator.rb
percheron-0.7.8 lib/percheron/config_delegator.rb
percheron-0.7.7 lib/percheron/config_delegator.rb
percheron-0.7.6 lib/percheron/config_delegator.rb
percheron-0.7.5 lib/percheron/config_delegator.rb
percheron-0.7.4 lib/percheron/config_delegator.rb
percheron-0.7.3 lib/percheron/config_delegator.rb
percheron-0.7.2 lib/percheron/config_delegator.rb
percheron-0.7.1 lib/percheron/config_delegator.rb
percheron-0.7.0 lib/percheron/config_delegator.rb