Sha256: 746c2a1c499333930962880abd118934a536f2d1446c8a8b031be2beff294cfb

Contents?: true

Size: 257 Bytes

Versions: 15

Compression:

Stored size: 257 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

15 entries across 15 versions & 1 rubygems

Version Path
percheron-0.6.4 lib/percheron/config_delegator.rb
percheron-0.6.3 lib/percheron/config_delegator.rb
percheron-0.6.2 lib/percheron/config_delegator.rb
percheron-0.6.1 lib/percheron/config_delegator.rb
percheron-0.6.0 lib/percheron/config_delegator.rb
percheron-0.5.0 lib/percheron/config_delegator.rb
percheron-0.4.0 lib/percheron/config_delegator.rb
percheron-0.3.2 lib/percheron/config_delegator.rb
percheron-0.3.1 lib/percheron/config_delegator.rb
percheron-0.3.0 lib/percheron/config_delegator.rb
percheron-0.2.4 lib/percheron/config_delegator.rb
percheron-0.2.3 lib/percheron/config_delegator.rb
percheron-0.2.2 lib/percheron/config_delegator.rb
percheron-0.2.1 lib/percheron/config_delegator.rb
percheron-0.2.0 lib/percheron/config_delegator.rb