mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
Make __profile_id private and add comment
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
11438d5d3c
commit
bf5ce746c9
1 changed files with 12 additions and 5 deletions
|
@ -22,11 +22,6 @@ module Inspec
|
|||
@action.call("describe.one", @checks, nil)
|
||||
end
|
||||
|
||||
def __profile_id
|
||||
# Excavate the profile ID. The action is a Method calling __add_check on a Rule whose profile ID we want
|
||||
@action.receiver.instance_variable_get(:@__profile_id)
|
||||
end
|
||||
|
||||
def input(input_name, options = {})
|
||||
input_with_profile_id(__profile_id, input_name, options)
|
||||
end
|
||||
|
@ -42,5 +37,17 @@ module Inspec
|
|||
def describe(*args, &block)
|
||||
@checks.push(["describe", args, block])
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# While this is marked private, it gets consumed during an instance_eval,
|
||||
# so it is fully visible. The double underscore is there to discourage
|
||||
# use - this is a private API.
|
||||
def __profile_id
|
||||
# Excavate the profile ID. The action is a Method calling __add_check on
|
||||
# a Rule whose profile ID we want
|
||||
@action.receiver.instance_variable_get(:@__profile_id)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue