Method: RC::DSL#config

Defined in:
lib/rc/dsl.rb

#config(command = nil, options = {}, &block) ⇒ Object

Raises:

  • (ArgumentError)


49
50
51
52
53
54
55
56
# File 'lib/rc/dsl.rb', line 49

def config(command=nil, options={}, &block)
  nested_keys = @_options.keys & options.keys.map{|k| k.to_sym}
  raise ArgumentError, "nested #{nested_keys.join(', ')}" unless nested_keys.empty?

  options = @_options.merge(options)

  @configuration.config(command, options, &block)
end