mirror of
https://github.com/inspec/inspec
synced 2024-11-15 01:17:08 +00:00
Removes profiles reader and replaces with ivar
The profiles method was never public and the @profiles is clearer. Signed-off-by: Franklin Webber <franklin@chef.io>
This commit is contained in:
parent
0a0431ac29
commit
ad82ac48c8
1 changed files with 2 additions and 4 deletions
|
@ -107,7 +107,7 @@ class InspecRspecJson < InspecRspecMiniJson # rubocop:disable Metrics/ClassLengt
|
|||
|
||||
# Called by the runner during example collection.
|
||||
def add_profile(profile)
|
||||
profiles.push(profile)
|
||||
@profiles.push(profile)
|
||||
end
|
||||
|
||||
def stop(notification)
|
||||
|
@ -124,8 +124,6 @@ class InspecRspecJson < InspecRspecMiniJson # rubocop:disable Metrics/ClassLengt
|
|||
|
||||
private
|
||||
|
||||
attr_reader :profiles
|
||||
|
||||
def all_unique_controls
|
||||
Array(@all_controls).uniq
|
||||
end
|
||||
|
@ -205,7 +203,7 @@ class InspecRspecJson < InspecRspecMiniJson # rubocop:disable Metrics/ClassLengt
|
|||
end
|
||||
|
||||
def profiles_info
|
||||
@profiles_info ||= profiles.map(&:info!).map(&:dup)
|
||||
@profiles_info ||= @profiles.map(&:info!).map(&:dup)
|
||||
end
|
||||
|
||||
def example2control(example)
|
||||
|
|
Loading…
Reference in a new issue