api: make control the default keyword

This commit is contained in:
Dominik Richter 2015-11-02 20:12:06 +01:00
parent e71f89691c
commit f976730a27

View file

@ -92,13 +92,18 @@ module Inspec
Class.new do
include dsl
define_method :rule do |*args, &block|
define_method :control do |*args, &block|
id = args[0]
opts = args[1] || {}
return if @skip_profile
__register_rule rule_class.new(id, opts, &block)
end
define_method :rule do |*args, &block|
# TODO: add deprecation notice
control(*args, &block)
end
define_method :describe do |*args, &block|
path = block.source_location[0]
line = block.source_location[1]