mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
api: make control the default keyword
This commit is contained in:
parent
e71f89691c
commit
f976730a27
1 changed files with 6 additions and 1 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue