Sha256: 84f89e18edabd5be6ee3cc5c67cc042123b83e40fa401bf71a2b42101a4d7dbb

Contents?: true

Size: 540 Bytes

Versions: 13

Compression:

Stored size: 540 Bytes

Contents

module Mixlib::Config
  alias_method :old_method_missing, :method_missing

  # Override Mixlib::Config#method_missing so we can do
  # things like this:
  #
  # @example define a nested group without use config_context
  #
  #  projects do
  #    branch_flow %w[release master]
  #    project-one do
  #      branch_flow %w[integration release master]
  #    end
  #  end
  def method_missing(method, *args, &block)
    if block_given?
      config_context(method, &block)
    else
      old_method_missing(method, *args)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
anvil-core-0.6.0 lib/gem_ext/mixlib.rb
anvil-core-0.5.0 lib/gem_ext/mixlib.rb
anvil-core-0.4.2 lib/gem_ext/mixlib.rb
anvil-core-0.4.1 lib/gem_ext/mixlib.rb
anvil-core-0.4.0 lib/gem_ext/mixlib.rb
anvil-core-0.3.2 lib/gem_ext/mixlib.rb
anvil-core-0.3.1 lib/gem_ext/mixlib.rb
anvil-core-0.3.0 lib/gem_ext/mixlib.rb
anvil-core-0.2.0 lib/gem_ext/mixlib.rb
anvil-core-0.1.0 lib/gem_ext/mixlib.rb
anvil-core-0.0.1.pre.alpha.3 lib/gem_ext/mixlib.rb
anvil-core-0.0.1.pre.alpha.2 lib/gem_ext/mixlib.rb
anvil-core-0.0.1.alpha.1 lib/gem_ext/mixlib.rb